#!/bin/sh
# MetaCard 2.4 stack
# The following is not ASCII text,
# so now would be a good time to q out of more
exec mc $0 "$@"
                                                                                                                                 e Untitled 1  Pon preOpenStack
   lock screen
   
   global G.array.DurationValues, G.array.DurationLetters
   
   put "1" into G.array.DurationValues["Q"]            put "Q" into G.array.DurationLetters["1"]
   put "2" into G.array.DurationValues["H"]            put "H" into G.array.DurationLetters["2"]
   put "4" into G.array.DurationValues["W"]            put "W" into G.array.DurationLetters["4"]
   put "0.5" into G.array.DurationValues["E"]          put "E" into G.array.DurationLetters["0.5"]
   put "0.25" into G.array.DurationValues["S"]        put "S" into G.array.DurationLetters["0.25"]
   put "1.5" into G.array.DurationValues["dQ"]       put "dQ" into G.array.DurationLetters["1.5"]
   put "2" into G.array.DurationValues["H"]             put "H" into G.array.DurationLetters["2"]
   put "3" into G.array.DurationsValues["dH"]         put "dH" into G.array.DurationLetters["3"]
   put "0.75" into G.array.DurationValues["dE"]      put "dE" into G.array.DurationLetters["0.75"]
   put "0.375" into G.array.DurationValues["dS"]    put "dS" into G.array.DurationLetters["0.375"]
   put "0.333" into G.array.DurationValues["T"]      put "T" into G.array.DurationLetters["0.333"]
   put "2.5" into G.array.DurationValues["H_E"]       put "H_E" into G.array.DurationLetters["2.5"]
   put "3.5" into G.array.DurationValues["H_dQ"]    put "H_dQ" into G.array.DurationLetters["3.5"]
   
   global G.array.ChromaticValues
   
   put 1 into G.array.ChromaticValues["A0"] put 2 into G.array.ChromaticValues["A#0"] put 3 into G.array.ChromaticValues["B0"] put 4 into G.array.ChromaticValues["C1"] put 5 into G.array.ChromaticValues["C#1"]
   put 6 into G.array.ChromaticValues["D1"] put 7 into G.array.ChromaticValues["D#1"] put 8 into G.array.ChromaticValues["E1"] put 9 into G.array.ChromaticValues["F1"] put 10 into G.array.ChromaticValues["F#1"] 
   put 11 into G.array.ChromaticValues["G1"] put 12 into G.array.ChromaticValues["G#1"] put 13 into G.array.ChromaticValues["A1"] put 14 into G.array.ChromaticValues["A#1"] put 15 into G.array.ChromaticValues["B1"]
   put 16 into G.array.ChromaticValues["C2"] put 17 into G.array.ChromaticValues["C#2"] put 18 into G.array.ChromaticValues["D2"] put 19 into G.array.ChromaticValues["D#2"] put 20 into G.array.ChromaticValues["E2"]
   put 21 into G.array.ChromaticValues["F2"] put 22 into G.array.ChromaticValues["F#2"] put 23 into G.array.ChromaticValues["G2"] put 24 into G.array.ChromaticValues["G#2"] put 25 into G.array.ChromaticValues["A2"]
   put 26 into G.array.ChromaticValues["A#2"] put 27 into G.array.ChromaticValues["B2"] put 28 into G.array.ChromaticValues["C3"] put 29 into G.array.ChromaticValues["C#3"] put 30 into G.array.ChromaticValues["D3"]
   put 31 into G.array.ChromaticValues["D#3"] put 32 into G.array.ChromaticValues["E3"] put 33 into G.array.ChromaticValues["F3"] put 34 into G.array.ChromaticValues["F#3"] put 35 into G.array.ChromaticValues["G3"]
   put 36 into G.array.ChromaticValues["G#3"] put 37 into G.array.ChromaticValues["A3"] put 38 into G.array.ChromaticValues["A#3"] put 39 into G.array.ChromaticValues["B3"] put 40 into G.array.ChromaticValues["C4"]
   put 41 into G.array.ChromaticValues["C#4"] put 42 into G.array.ChromaticValues["D4"] put 43 into G.array.ChromaticValues["D#4"] put 44 into G.array.ChromaticValues["E4"] put 45 into G.array.ChromaticValues["F4"]
   put 46 into G.array.ChromaticValues["F#4"] put 47 into G.array.ChromaticValues["G4"] put 48 into G.array.ChromaticValues["G#4"] put 49 into G.array.ChromaticValues["A4"] put 50 into G.array.ChromaticValues["A#4"]
   put 51 into G.array.ChromaticValues["B4"] put 52 into G.array.ChromaticValues["C5"] put 53 into G.array.ChromaticValues["C#5"] put 54 into G.array.ChromaticValues["D5"] put 55 into G.array.ChromaticValues["D#5"]
   put 56 into G.array.ChromaticValues["E5"] put 57 into G.array.ChromaticValues["F5"] put 58 into G.array.ChromaticValues["F#5"] put 59 into G.array.ChromaticValues["G5"] put 60 into G.array.ChromaticValues["G#5"]
   put 61 into G.array.ChromaticValues["A5"] put 62 into G.array.ChromaticValues["A#5"] put 63 into G.array.ChromaticValues["B5"] put 64 into G.array.ChromaticValues["C6"] put 65 into G.array.ChromaticValues["C#6"]
   put 66 into G.array.ChromaticValues["D6"] put 67 into G.array.ChromaticValues["D#6"] put 68 into G.array.ChromaticValues["E6"] put 69 into G.array.ChromaticValues["F6"] put 70 into G.array.ChromaticValues["F#6"]
   put 71 into G.array.ChromaticValues["G6"] put 72 into G.array.ChromaticValues["G#6"] put 73 into G.array.ChromaticValues["A6"] put 74 into G.array.ChromaticValues["A#6"] put 75 into G.array.ChromaticValues["B6"]
   put 76 into G.array.ChromaticValues["C7"] put 77 into G.array.ChromaticValues["C#7"] put 78 into G.array.ChromaticValues["D7"] put 79 into G.array.ChromaticValues["D#7"] put 80 into G.array.ChromaticValues["E7"]
   put 81 into G.array.ChromaticValues["F7"] put 82 into G.array.ChromaticValues["F#7"] put 83 into G.array.ChromaticValues["G7"] put 84 into G.array.ChromaticValues["G#7"] put 85 into G.array.ChromaticValues["A7"]
   put 86 into G.array.ChromaticValues["A#7"] put 87 into G.array.ChromaticValues["B7"] put 88 into G.array.ChromaticValues["C8"]
   
   put 1 into G.array.ChromaticValues["A0"] put 2 into G.array.ChromaticValues["Bb0"] put 3 into G.array.ChromaticValues["B0"] put 4 into G.array.ChromaticValues["C1"] put 5 into G.array.ChromaticValues["Db1"]
   put 6 into G.array.ChromaticValues["D1"] put 7 into G.array.ChromaticValues["Eb1"] put 8 into G.array.ChromaticValues["E1"] put 9 into G.array.ChromaticValues["F1"] put 10 into G.array.ChromaticValues["Gb1"] 
   put 11 into G.array.ChromaticValues["G1"] put 12 into G.array.ChromaticValues["Ab1"] put 13 into G.array.ChromaticValues["A1"] put 14 into G.array.ChromaticValues["Bb1"] put 15 into G.array.ChromaticValues["B1"]
   put 16 into G.array.ChromaticValues["C2"] put 17 into G.array.ChromaticValues["Db2"] put 18 into G.array.ChromaticValues["D2"] put 19 into G.array.ChromaticValues["Eb2"] put 20 into G.array.ChromaticValues["E2"]
   put 21 into G.array.ChromaticValues["F2"] put 22 into G.array.ChromaticValues["Gb2"] put 23 into G.array.ChromaticValues["G2"] put 24 into G.array.ChromaticValues["Ab2"] put 25 into G.array.ChromaticValues["A2"]
   put 26 into G.array.ChromaticValues["Bb2"] put 27 into G.array.ChromaticValues["B2"] put 28 into G.array.ChromaticValues["C3"] put 29 into G.array.ChromaticValues["Db3"] put 30 into G.array.ChromaticValues["D3"]
   put 31 into G.array.ChromaticValues["Eb3"] put 32 into G.array.ChromaticValues["E3"] put 33 into G.array.ChromaticValues["F3"] put 34 into G.array.ChromaticValues["Gb3"] put 35 into G.array.ChromaticValues["G3"]
   put 36 into G.array.ChromaticValues["Ab3"] put 37 into G.array.ChromaticValues["A3"] put 38 into G.array.ChromaticValues["Bb3"] put 39 into G.array.ChromaticValues["B3"] put 40 into G.array.ChromaticValues["C4"]
   put 41 into G.array.ChromaticValues["Db4"] put 42 into G.array.ChromaticValues["D4"] put 43 into G.array.ChromaticValues["Eb4"] put 44 into G.array.ChromaticValues["E4"] put 45 into G.array.ChromaticValues["F4"]
   put 46 into G.array.ChromaticValues["Gb4"] put 47 into G.array.ChromaticValues["G4"] put 48 into G.array.ChromaticValues["Ab4"] put 49 into G.array.ChromaticValues["A4"] put 50 into G.array.ChromaticValues["Bb4"]
   put 51 into G.array.ChromaticValues["B4"] put 52 into G.array.ChromaticValues["C5"] put 53 into G.array.ChromaticValues["Db5"] put 54 into G.array.ChromaticValues["D5"] put 55 into G.array.ChromaticValues["Eb5"]
   put 56 into G.array.ChromaticValues["E5"] put 57 into G.array.ChromaticValues["F5"] put 58 into G.array.ChromaticValues["Gb5"] put 59 into G.array.ChromaticValues["G5"] put 60 into G.array.ChromaticValues["Ab5"]
   put 61 into G.array.ChromaticValues["A5"] put 62 into G.array.ChromaticValues["Bb5"] put 63 into G.array.ChromaticValues["B5"] put 64 into G.array.ChromaticValues["C6"] put 65 into G.array.ChromaticValues["Db6"]
   put 66 into G.array.ChromaticValues["D6"] put 67 into G.array.ChromaticValues["Eb6"] put 68 into G.array.ChromaticValues["E6"] put 69 into G.array.ChromaticValues["F6"] put 70 into G.array.ChromaticValues["Gb6"]
   put 71 into G.array.ChromaticValues["G6"] put 72 into G.array.ChromaticValues["Ab6"] put 73 into G.array.ChromaticValues["A6"] put 74 into G.array.ChromaticValues["Bb6"] put 75 into G.array.ChromaticValues["B6"]
   put 76 into G.array.ChromaticValues["C7"] put 77 into G.array.ChromaticValues["Db7"] put 78 into G.array.ChromaticValues["D7"] put 79 into G.array.ChromaticValues["Eb7"] put 80 into G.array.ChromaticValues["E7"]
   put 81 into G.array.ChromaticValues["F7"] put 82 into G.array.ChromaticValues["Gb7"] put 83 into G.array.ChromaticValues["G7"] put 84 into G.array.ChromaticValues["Ab7"] put 85 into G.array.ChromaticValues["A7"]
   put 86 into G.array.ChromaticValues["Bb7"] put 87 into G.array.ChromaticValues["B7"] put 88 into G.array.ChromaticValues["C8"]
   
   global G.array.SharpChromaticPitches, G.array.FlatChromaticPitches
   
   put "A0" into G.array.SharpChromaticPitches[1] put "A#1" into G.array.SharpChromaticPitches[2] put "B0" into G.array.SharpChromaticPitches[3] put "C1" into G.array.SharpChromaticPitches[4] put "C#1" into G.array.SharpChromaticPitches[5]
   put "D1" into G.array.SharpChromaticPitches[6] put "D#1" into G.array.SharpChromaticPitches[7] put "E1" into G.array.SharpChromaticPitches[8] put "F1" into G.array.SharpChromaticPitches[9] put "F#1" into G.array.SharpChromaticPitches[10] 
   put "G1" into G.array.SharpChromaticPitches[11] put "G#1" into G.array.SharpChromaticPitches[12] put "A1" into G.array.SharpChromaticPitches[13] put "A#1" into G.array.SharpChromaticPitches[14] put "B1" into G.array.SharpChromaticPitches[15]
   put "C2" into G.array.SharpChromaticPitches[16] put "C#2" into G.array.SharpChromaticPitches[17] put "D2" into G.array.SharpChromaticPitches[18] put "D#2" into G.array.SharpChromaticPitches[19] put "E2" into G.array.SharpChromaticPitches[20]
   put "F2" into G.array.SharpChromaticPitches[21] put "F#2" into G.array.SharpChromaticPitches[22] put "G2" into G.array.SharpChromaticPitches[23] put "G#2" into G.array.SharpChromaticPitches[24] put "A2" into G.array.SharpChromaticPitches[25]
   put "A#2" into G.array.SharpChromaticPitches[26] put "B2" into G.array.SharpChromaticPitches[27] put "C3" into G.array.SharpChromaticPitches[28] put "C#3" into G.array.SharpChromaticPitches[29] put "D3" into G.array.SharpChromaticPitches[30]
   put "D#3" into G.array.SharpChromaticPitches[31] put "E3" into G.array.SharpChromaticPitches[32] put "F3" into G.array.SharpChromaticPitches[33] put "F#3" into G.array.SharpChromaticPitches[34] put "G3" into G.array.SharpChromaticPitches[35]
   put "G#3" into G.array.SharpChromaticPitches[36] put "A3" into G.array.SharpChromaticPitches[37] put "A#3" into G.array.SharpChromaticPitches[38] put "B3" into G.array.SharpChromaticPitches[39] put "C4" into G.array.SharpChromaticPitches[40]
   put "C#4" into G.array.SharpChromaticPitches[41] put "D4" into G.array.SharpChromaticPitches[42] put "D#4" into G.array.SharpChromaticPitches[43] put "E4" into G.array.SharpChromaticPitches[44] put "F4" into G.array.SharpChromaticPitches[45]
   put "F#4" into G.array.SharpChromaticPitches[46] put "G4" into G.array.SharpChromaticPitches[47] put "G#4" into G.array.SharpChromaticPitches[48] put "A4" into G.array.SharpChromaticPitches[49] put "A#4" into G.array.SharpChromaticPitches[50]
   put "B4" into G.array.SharpChromaticPitches[51] put "C5" into G.array.SharpChromaticPitches[52] put "C#5" into G.array.SharpChromaticPitches[53] put "D5" into G.array.SharpChromaticPitches[54] put "D#5" into G.array.SharpChromaticPitches[55]
   put "E5" into G.array.SharpChromaticPitches[56] put "F5" into G.array.SharpChromaticPitches[57] put "F#5" into G.array.SharpChromaticPitches[58] put "G5" into G.array.SharpChromaticPitches[59] put "G#5" into G.array.SharpChromaticPitches[60]
   put "A5" into G.array.SharpChromaticPitches[61] put "A#5" into G.array.SharpChromaticPitches[62] put "B5" into G.array.SharpChromaticPitches[63] put "C6" into G.array.SharpChromaticPitches[64] put "C#6" into G.array.SharpChromaticPitches[65]
   put "D6" into G.array.SharpChromaticPitches[66] put "D#6" into G.array.SharpChromaticPitches[67] put "E6" into G.array.SharpChromaticPitches[68] put "F6" into G.array.SharpChromaticPitches[69] put "F#6" into G.array.SharpChromaticPitches[70]
   put "G6" into G.array.SharpChromaticPitches[71] put "G#6" into G.array.SharpChromaticPitches[72] put "A6" into G.array.SharpChromaticPitches[73] put "A#6" into G.array.SharpChromaticPitches[74] put "B6" into G.array.SharpChromaticPitches[75]
   put "C7" into G.array.SharpChromaticPitches[76] put "C#7" into G.array.SharpChromaticPitches[77] put "D7" into G.array.SharpChromaticPitches[78] put "D#7" into G.array.SharpChromaticPitches[79] put "E7" into G.array.SharpChromaticPitches[80]
   put "F7" into G.array.SharpChromaticPitches[81] put "F#7" into G.array.SharpChromaticPitches[82] put "G7" into G.array.SharpChromaticPitches[83] put "G#7" into G.array.SharpChromaticPitches[84] put "A7" into G.array.SharpChromaticPitches[85]
   put "A#7" into G.array.SharpChromaticPitches[86] put "B7" into G.array.SharpChromaticPitches[87] put "C8" into G.array.SharpChromaticPitches[88]
   
   put "A0" into G.array.FlatChromaticPitches[1] put "Bb0" into G.array.FlatChromaticPitches[2] put "B1" into G.array.FlatChromaticPitches[3] put "C1" into G.array.FlatChromaticPitches[4] put "Db1" into G.array.FlatChromaticPitches[5]
   put "D1" into G.array.FlatChromaticPitches[6] put "Eb1" into G.array.FlatChromaticPitches[7] put "E1" into G.array.FlatChromaticPitches[8] put "F1" into G.array.FlatChromaticPitches[9] put "Gb1" into G.array.FlatChromaticPitches[10] 
   put "G1" into G.array.FlatChromaticPitches[11] put "Ab1" into G.array.FlatChromaticPitches[12] put "A1" into G.array.FlatChromaticPitches[13] put "Bb1" into G.array.FlatChromaticPitches[14] put "B1" into G.array.FlatChromaticPitches[15]
   put "C2" into G.array.FlatChromaticPitches[16] put "Db2" into G.array.FlatChromaticPitches[17] put "D2" into G.array.FlatChromaticPitches[18] put "Eb2" into G.array.FlatChromaticPitches[19] put "E2" into G.array.FlatChromaticPitches[20]
   put "F2" into G.array.FlatChromaticPitches[21] put "Gb2" into G.array.FlatChromaticPitches[22] put "G2" into G.array.FlatChromaticPitches[23] put "Ab2" into G.array.FlatChromaticPitches[24] put "A2" into G.array.FlatChromaticPitches[25]
   put "Bb2" into G.array.FlatChromaticPitches[26] put "B2" into G.array.FlatChromaticPitches[27] put "C3" into G.array.FlatChromaticPitches[28] put "Db3" into G.array.FlatChromaticPitches[29] put "D3" into G.array.FlatChromaticPitches[30]
   put "Eb2" into G.array.FlatChromaticPitches[31] put "E3" into G.array.FlatChromaticPitches[32] put "F3" into G.array.FlatChromaticPitches[33] put "Gb3" into G.array.FlatChromaticPitches[34] put "G3" into G.array.FlatChromaticPitches[35]
   put "Ab3" into G.array.FlatChromaticPitches[36] put "A3" into G.array.FlatChromaticPitches[37] put "Bb3" into G.array.FlatChromaticPitches[38] put "B3" into G.array.FlatChromaticPitches[39] put "C4" into G.array.FlatChromaticPitches[40]
   put "Db4" into G.array.FlatChromaticPitches[41] put "D4" into G.array.FlatChromaticPitches[42] put "Eb4" into G.array.FlatChromaticPitches[43] put "E4" into G.array.FlatChromaticPitches[44] put "F4" into G.array.FlatChromaticPitches[45]
   put "Gb4" into G.array.FlatChromaticPitches[46] put "G4" into G.array.FlatChromaticPitches[47] put "Ab4" into G.array.FlatChromaticPitches[48] put "A4" into G.array.FlatChromaticPitches[49] put "Bb4" into G.array.FlatChromaticPitches[50]
   put "B4" into G.array.FlatChromaticPitches[51] put "C5" into G.array.FlatChromaticPitches[52] put "Db5" into G.array.FlatChromaticPitches[53] put "D5" into G.array.FlatChromaticPitches[54] put "Eb5" into G.array.FlatChromaticPitches[55]
   put "E5" into G.array.FlatChromaticPitches[56] put "F5" into G.array.FlatChromaticPitches[57] put "Gb5" into G.array.FlatChromaticPitches[58] put "G5" into G.array.FlatChromaticPitches[59] put "Ab5" into G.array.FlatChromaticPitches[60]
   put "A5" into G.array.FlatChromaticPitches[61] put "Bb5" into G.array.FlatChromaticPitches[62] put "B5" into G.array.FlatChromaticPitches[63] put "C6" into G.array.FlatChromaticPitches[64] put "Db6" into G.array.FlatChromaticPitches[65]
   put "D6" into G.array.FlatChromaticPitches[66] put "Eb6" into G.array.FlatChromaticPitches[67] put "E6" into G.array.FlatChromaticPitches[68] put "F6" into G.array.FlatChromaticPitches[69] put "Gb6" into G.array.FlatChromaticPitches[70]
   put "G6" into G.array.FlatChromaticPitches[71] put "Ab6" into G.array.FlatChromaticPitches[72] put "A6" into G.array.FlatChromaticPitches[73] put "Bb6" into G.array.FlatChromaticPitches[74] put "B6" into G.array.FlatChromaticPitches[75]
   put "C7" into G.array.FlatChromaticPitches[76] put "Db7" into G.array.FlatChromaticPitches[77] put "D7" into G.array.FlatChromaticPitches[78] put "Eb7" into G.array.FlatChromaticPitches[79] put "E7" into G.array.FlatChromaticPitches[80]
   put "F7" into G.array.FlatChromaticPitches[81] put "Gb7" into G.array.FlatChromaticPitches[82] put "G7" into G.array.FlatChromaticPitches[83] put "Ab7" into G.array.FlatChromaticPitches[84] put "A7" into G.array.FlatChromaticPitches[85]
   put "Bb7" into G.array.FlatChromaticPitches[86] put "B7" into G.array.FlatChromaticPitches[87] put "C8" into G.array.FlatChromaticPitches[88]
   
   global G.array.PianoPlayerPaths, G.array.PianoPlayerChannels
   
   put "Channel: Rest" into G.array.PianoPlayerChannels[r]
   put "Channel: C1" into G.array.PianoPlayerChannels[4]
   put "Channel: C2" into G.array.PianoPlayerChannels[16]
   put "Channel: C3" into G.array.PianoPlayerChannels[28]
   put "Channel: C4" into G.array.PianoPlayerChannels[40]
   put "Channel: C5" into G.array.PianoPlayerChannels[52]
   put "Channel: C6" into G.array.PianoPlayerChannels[64]
   put "Channel: C7" into G.array.PianoPlayerChannels[76]
   put "Channel: C8" into G.array.PianoPlayerChannels[88]
   put "Channel: D1" into G.array.PianoPlayerChannels[6]
   put "Channel: D2" into G.array.PianoPlayerChannels[18]
   put "Channel: D3" into G.array.PianoPlayerChannels[30]
   put "Channel: D4" into G.array.PianoPlayerChannels[42]
   put "Channel: D5" into G.array.PianoPlayerChannels[54]
   put "Channel: D6" into G.array.PianoPlayerChannels[66]
   put "Channel: D7" into G.array.PianoPlayerChannels[78]
   put "Channel: E1" into G.array.PianoPlayerChannels[8]
   put "Channel: E2" into G.array.PianoPlayerChannels[20]
   put "Channel: E3" into G.array.PianoPlayerChannels[32]
   put "Channel: E4" into G.array.PianoPlayerChannels[44]
   put "Channel: E5" into G.array.PianoPlayerChannels[56]
   put "Channel: E6" into G.array.PianoPlayerChannels[68]
   put "Channel: E7" into G.array.PianoPlayerChannels[80]
   put "Channel: F1" into G.array.PianoPlayerChannels[9]
   put "Channel: F2" into G.array.PianoPlayerChannels[21]
   put "Channel: F3" into G.array.PianoPlayerChannels[33]
   put "Channel: F4" into G.array.PianoPlayerChannels[45]
   put "Channel: F5" into G.array.PianoPlayerChannels[57]
   put "Channel: F6" into G.array.PianoPlayerChannels[69]
   put "Channel: F7" into G.array.PianoPlayerChannels[81]
   put "Channel: G1" into G.array.PianoPlayerChannels[11]
   put "Channel: G2" into G.array.PianoPlayerChannels[23]
   put "Channel: G3" into G.array.PianoPlayerChannels[35]
   put "Channel: G4" into G.array.PianoPlayerChannels[47]
   put "Channel: G5" into G.array.PianoPlayerChannels[59]
   put "Channel: G6" into G.array.PianoPlayerChannels[71]
   put "Channel: G7" into G.array.PianoPlayerChannels[83]
   put "Channel: A0" into G.array.PianoPlayerChannels[1]
   put "Channel: A1" into G.array.PianoPlayerChannels[13]
   put "Channel: A2" into G.array.PianoPlayerChannels[25]
   put "Channel: A3" into G.array.PianoPlayerChannels[37]
   put "Channel: A4" into G.array.PianoPlayerChannels[49]
   put "Channel: A5" into G.array.PianoPlayerChannels[61]
   put "Channel: A6" into G.array.PianoPlayerChannels[73]
   put "Channel: A7" into G.array.PianoPlayerChannels[85]
   put "Channel: B0" into G.array.PianoPlayerChannels[3]
   put "Channel: B1" into G.array.PianoPlayerChannels[15]
   put "Channel: B2" into G.array.PianoPlayerChannels[27]
   put "Channel: B3" into G.array.PianoPlayerChannels[39]
   put "Channel: B4" into G.array.PianoPlayerChannels[51]
   put "Channel: B5" into G.array.PianoPlayerChannels[63]
   put "Channel: B6" into G.array.PianoPlayerChannels[75]
   put "Channel: B7" into G.array.PianoPlayerChannels[87]
   put "Channel: C#-Db1" into G.array.PianoPlayerChannels[5]
   put "Channel: C#-Db2" into G.array.PianoPlayerChannels[17]
   put "Channel: C#-Db3" into G.array.PianoPlayerChannels[29]
   put "Channel: C#-Db4" into G.array.PianoPlayerChannels[41]
   put "Channel: C#-Db5" into G.array.PianoPlayerChannels[53]
   put "Channel: C#-Db6" into G.array.PianoPlayerChannels[65]
   put "Channel: C#-Db7" into G.array.PianoPlayerChannels[77]
   put "Channel: D#-Eb1" into G.array.PianoPlayerChannels[7]
   put "Channel: D#-Eb2" into G.array.PianoPlayerChannels[19]
   put "Channel: D#-Eb3" into G.array.PianoPlayerChannels[31]
   put "Channel: D#-Eb4" into G.array.PianoPlayerChannels[43]
   put "Channel: D#-Eb5" into G.array.PianoPlayerChannels[55]
   put "Channel: D#-Eb6" into G.array.PianoPlayerChannels[67]
   put "Channel: D#-Eb7" into G.array.PianoPlayerChannels[79]
   put "Channel: F#-Gb1" into G.array.PianoPlayerChannels[10] 
   put "Channel: F#-Gb2" into G.array.PianoPlayerChannels[22] 
   put "Channel: F#-Gb3" into G.array.PianoPlayerChannels[34]
   put "Channel: F#-Gb4" into G.array.PianoPlayerChannels[46]
   put "Channel: F#-Gb5" into G.array.PianoPlayerChannels[58]
   put "Channel: F#-Gb6" into G.array.PianoPlayerChannels[70]
   put "Channel: F#-Gb7" into G.array.PianoPlayerChannels[82]
   put "Channel: G#-Ab1" into G.array.PianoPlayerChannels[12]
   put "Channel: G#-Ab2" into G.array.PianoPlayerChannels[24]
   put "Channel: G#-Ab3" into G.array.PianoPlayerChannels[36]
   put "Channel: G#-Ab4" into G.array.PianoPlayerChannels[48]
   put "Channel: G#-Ab5" into G.array.PianoPlayerChannels[60]
   put "Channel: G#-Ab6" into G.array.PianoPlayerChannels[72]
   put "Channel: G#-Ab7" into G.array.PianoPlayerChannels[84]
   put "Channel: A#-Bb0" into G.array.PianoPlayerChannels[2]
   put "Channel: A#-Bb1" into G.array.PianoPlayerChannels[14]
   put "Channel: A#-Bb2" into G.array.PianoPlayerChannels[26]
   put "Channel: A#-Bb3" into G.array.PianoPlayerChannels[38]
   put "Channel: A#-Bb4" into G.array.PianoPlayerChannels[50]
   put "Channel: A#-Bb5" into G.array.PianoPlayerChannels[62]
   put "Channel: A#-Bb6" into G.array.PianoPlayerChannels[74]
   put "Channel: A#-Bb7" into G.array.PianoPlayerChannels[86]
   
   put (specialFolderPath("engine") & "/Piano Notes/Rest.wav") into G.array.PianoPlayerPaths[r]
   put (specialFolderPath("engine") & "/Piano Notes/C1.wav") into G.array.PianoPlayerPaths[4]
   put (specialFolderPath("engine") & "/Piano Notes/C2.wav") into G.array.PianoPlayerPaths[16]
   put (specialFolderPath("engine") & "/Piano Notes/C3.wav") into G.array.PianoPlayerPaths[28]
   put (specialFolderPath("engine") & "/Piano Notes/C4.wav") into G.array.PianoPlayerPaths[40]
   put (specialFolderPath("engine") & "/Piano Notes/C5.wav") into G.array.PianoPlayerPaths[52]
   put (specialFolderPath("engine") & "/Piano Notes/C6.wav") into G.array.PianoPlayerPaths[64]
   put (specialFolderPath("engine") & "/Piano Notes/C7.wav") into G.array.PianoPlayerPaths[76]
   put (specialFolderPath("engine") & "/Piano Notes/C8.wav") into G.array.PianoPlayerPaths[88]
   put (specialFolderPath("engine") & "/Piano Notes/D1.wav") into G.array.PianoPlayerPaths[6]
   put (specialFolderPath("engine") & "/Piano Notes/D2.wav") into G.array.PianoPlayerPaths[18]
   put (specialFolderPath("engine") & "/Piano Notes/D3.wav") into G.array.PianoPlayerPaths[30]
   put (specialFolderPath("engine") & "/Piano Notes/D4.wav") into G.array.PianoPlayerPaths[42]
   put (specialFolderPath("engine") & "/Piano Notes/D5.wav") into G.array.PianoPlayerPaths[54]
   put (specialFolderPath("engine") & "/Piano Notes/D6.wav") into G.array.PianoPlayerPaths[66]
   put (specialFolderPath("engine") & "/Piano Notes/D7.wav") into G.array.PianoPlayerPaths[78]
   put (specialFolderPath("engine") & "/Piano Notes/E1.wav") into G.array.PianoPlayerPaths[8]
   put (specialFolderPath("engine") & "/Piano Notes/E2.wav") into G.array.PianoPlayerPaths[20]
   put (specialFolderPath("engine") & "/Piano Notes/E3.wav") into G.array.PianoPlayerPaths[32]
   put (specialFolderPath("engine") & "/Piano Notes/E4.wav") into G.array.PianoPlayerPaths[44]
   put (specialFolderPath("engine") & "/Piano Notes/E5.wav") into G.array.PianoPlayerPaths[56]
   put (specialFolderPath("engine") & "/Piano Notes/E6.wav") into G.array.PianoPlayerPaths[68]
   put (specialFolderPath("engine") & "/Piano Notes/E7.wav") into G.array.PianoPlayerPaths[80]
   put (specialFolderPath("engine") & "/Piano Notes/F1.wav") into G.array.PianoPlayerPaths[9]
   put (specialFolderPath("engine") & "/Piano Notes/F2.wav") into G.array.PianoPlayerPaths[21]
   put (specialFolderPath("engine") & "/Piano Notes/F3.wav") into G.array.PianoPlayerPaths[33]
   put (specialFolderPath("engine") & "/Piano Notes/F4.wav") into G.array.PianoPlayerPaths[45]
   put (specialFolderPath("engine") & "/Piano Notes/F5.wav") into G.array.PianoPlayerPaths[57]
   put (specialFolderPath("engine") & "/Piano Notes/F6.wav") into G.array.PianoPlayerPaths[69]
   put (specialFolderPath("engine") & "/Piano Notes/F7.wav") into G.array.PianoPlayerPaths[81]
   put (specialFolderPath("engine") & "/Piano Notes/G1.wav") into G.array.PianoPlayerPaths[11]
   put (specialFolderPath("engine") & "/Piano Notes/G2.wav") into G.array.PianoPlayerPaths[23]
   put (specialFolderPath("engine") & "/Piano Notes/G3.wav") into G.array.PianoPlayerPaths[35]
   put (specialFolderPath("engine") & "/Piano Notes/G4.wav") into G.array.PianoPlayerPaths[47]
   put (specialFolderPath("engine") & "/Piano Notes/G5.wav") into G.array.PianoPlayerPaths[59]
   put (specialFolderPath("engine") & "/Piano Notes/G6.wav") into G.array.PianoPlayerPaths[71]
   put (specialFolderPath("engine") & "/Piano Notes/G7.wav") into G.array.PianoPlayerPaths[83]
   put (specialFolderPath("engine") & "/Piano Notes/A0.wav") into G.array.PianoPlayerPaths[1]
   put (specialFolderPath("engine") & "/Piano Notes/A1.wav") into G.array.PianoPlayerPaths[13]
   put (specialFolderPath("engine") & "/Piano Notes/A2.wav") into G.array.PianoPlayerPaths[25]
   put (specialFolderPath("engine") & "/Piano Notes/A3.wav") into G.array.PianoPlayerPaths[37]
   put (specialFolderPath("engine") & "/Piano Notes/A4.wav") into G.array.PianoPlayerPaths[49]
   put (specialFolderPath("engine") & "/Piano Notes/A5.wav") into G.array.PianoPlayerPaths[61]
   put (specialFolderPath("engine") & "/Piano Notes/A6.wav") into G.array.PianoPlayerPaths[73]
   put (specialFolderPath("engine") & "/Piano Notes/A7.wav") into G.array.PianoPlayerPaths[85]
   put (specialFolderPath("engine") & "/Piano Notes/B0.wav") into G.array.PianoPlayerPaths[3]
   put (specialFolderPath("engine") & "/Piano Notes/B1.wav") into G.array.PianoPlayerPaths[15]
   put (specialFolderPath("engine") & "/Piano Notes/B2.wav") into G.array.PianoPlayerPaths[27]
   put (specialFolderPath("engine") & "/Piano Notes/B3.wav") into G.array.PianoPlayerPaths[39]
   put (specialFolderPath("engine") & "/Piano Notes/B4.wav") into G.array.PianoPlayerPaths[51]
   put (specialFolderPath("engine") & "/Piano Notes/B5.wav") into G.array.PianoPlayerPaths[63]
   put (specialFolderPath("engine") & "/Piano Notes/B6.wav") into G.array.PianoPlayerPaths[75]
   put (specialFolderPath("engine") & "/Piano Notes/B7.wav") into G.array.PianoPlayerPaths[87]
   put (specialFolderPath("engine") & "/Piano Notes/C#-Db1.wav") into G.array.PianoPlayerPaths[5]
   put (specialFolderPath("engine") & "/Piano Notes/C#-Db2.wav") into G.array.PianoPlayerPaths[17]
   put (specialFolderPath("engine") & "/Piano Notes/C#-Db3.wav") into G.array.PianoPlayerPaths[29]
   put (specialFolderPath("engine") & "/Piano Notes/C#-Db4.wav") into G.array.PianoPlayerPaths[41]
   put (specialFolderPath("engine") & "/Piano Notes/C#-Db5.wav") into G.array.PianoPlayerPaths[53]
   put (specialFolderPath("engine") & "/Piano Notes/C#-Db6.wav") into G.array.PianoPlayerPaths[65]
   put (specialFolderPath("engine") & "/Piano Notes/C#-Db7.wav") into G.array.PianoPlayerPaths[77]
   put (specialFolderPath("engine") & "/Piano Notes/D#-Eb1.wav") into G.array.PianoPlayerPaths[7]
   put (specialFolderPath("engine") & "/Piano Notes/D#-Eb2.wav") into G.array.PianoPlayerPaths[19]
   put (specialFolderPath("engine") & "/Piano Notes/D#-Eb3.wav") into G.array.PianoPlayerPaths[31]
   put (specialFolderPath("engine") & "/Piano Notes/D#-Eb4.wav") into G.array.PianoPlayerPaths[43]
   put (specialFolderPath("engine") & "/Piano Notes/D#-Eb5.wav") into G.array.PianoPlayerPaths[55]
   put (specialFolderPath("engine") & "/Piano Notes/D#-Eb6.wav") into G.array.PianoPlayerPaths[67]
   put (specialFolderPath("engine") & "/Piano Notes/D#-Eb7.wav") into G.array.PianoPlayerPaths[79]
   put (specialFolderPath("engine") & "/Piano Notes/F#-Gb1.wav") into G.array.PianoPlayerPaths[10]
   put (specialFolderPath("engine") & "/Piano Notes/F#-Gb2.wav") into G.array.PianoPlayerPaths[22]
   put (specialFolderPath("engine") & "/Piano Notes/F#-Gb3.wav") into G.array.PianoPlayerPaths[34]
   put (specialFolderPath("engine") & "/Piano Notes/F#-Gb4.wav") into G.array.PianoPlayerPaths[46]
   put (specialFolderPath("engine") & "/Piano Notes/F#-Gb5.wav") into G.array.PianoPlayerPaths[58]
   put (specialFolderPath("engine") & "/Piano Notes/F#-Gb6.wav") into G.array.PianoPlayerPaths[70]
   put (specialFolderPath("engine") & "/Piano Notes/F#-Gb7.wav") into G.array.PianoPlayerPaths[82]
   put (specialFolderPath("engine") & "/Piano Notes/G#-Ab1.wav") into G.array.PianoPlayerPaths[12]
   put (specialFolderPath("engine") & "/Piano Notes/G#-Ab2.wav") into G.array.PianoPlayerPaths[24]
   put (specialFolderPath("engine") & "/Piano Notes/G#-Ab3.wav") into G.array.PianoPlayerPaths[36]
   put (specialFolderPath("engine") & "/Piano Notes/G#-Ab4.wav") into G.array.PianoPlayerPaths[48]
   put (specialFolderPath("engine") & "/Piano Notes/G#-Ab5.wav") into G.array.PianoPlayerPaths[60]
   put (specialFolderPath("engine") & "/Piano Notes/G#-Ab6.wav") into G.array.PianoPlayerPaths[72]
   put (specialFolderPath("engine") & "/Piano Notes/G#-Ab7.wav") into G.array.PianoPlayerPaths[84]
   put (specialFolderPath("engine") & "/Piano Notes/A#-Bb0.wav") into G.array.PianoPlayerPaths[2]
   put (specialFolderPath("engine") & "/Piano Notes/A#-Bb1.wav") into G.array.PianoPlayerPaths[14]
   put (specialFolderPath("engine") & "/Piano Notes/A#-Bb2.wav") into G.array.PianoPlayerPaths[26]
   put (specialFolderPath("engine") & "/Piano Notes/A#-Bb3.wav") into G.array.PianoPlayerPaths[38]
   put (specialFolderPath("engine") & "/Piano Notes/A#-Bb4.wav") into G.array.PianoPlayerPaths[50]
   put (specialFolderPath("engine") & "/Piano Notes/A#-Bb5.wav") into G.array.PianoPlayerPaths[62]
   put (specialFolderPath("engine") & "/Piano Notes/A#-Bb6.wav") into G.array.PianoPlayerPaths[74]
   put (specialFolderPath("engine") & "/Piano Notes/A#-B7.wav") into G.array.PianoPlayerPaths[86]
   
   set the filename of Player "Piano Player 0" to "/Users/Cyclone/Desktop/Generator/Piano Notes/Rest.wav"
   set the filename of Player "Piano Player 1" to "/Users/Cyclone/Desktop/Generator/Piano Notes/A0.wav" 
   set the filename of Player "Piano Player 2" to "/Users/Cyclone/Desktop/Generator/Piano Notes/A#-Bb0.wav" 
   set the filename of Player "Piano Player 3" to "/Users/Cyclone/Desktop/Generator/Piano Notes/B0.wav"
   set the filename of Player "Piano Player 4" to "/Users/Cyclone/Desktop/Generator/Piano Notes/C1.wav"
   set the filename of Player "Piano Player 5" to "/Users/Cyclone/Desktop/Generator/Piano Notes/C#-Db1.wav"
   set the filename of Player "Piano Player 6" to "/Users/Cyclone/Desktop/Generator/Piano Notes/D1.wav" 
   set the filename of Player "Piano Player 7" to "/Users/Cyclone/Desktop/Generator/Piano Notes/D#-Eb1.wav"
   set the filename of Player "Piano Player 8" to "/Users/Cyclone/Desktop/Generator/Piano Notes/E1.wav" 
   set the filename of Player "Piano Player 9" to "/Users/Cyclone/Desktop/Generator/Piano Notes/F1.wav" 
   set the filename of Player "Piano Player 10" to "/Users/Cyclone/Desktop/Generator/Piano Notes/F#-Gb1.wav"
   set the filename of Player "Piano Player 11" to "/Users/Cyclone/Desktop/Generator/Piano Notes/G1.wav" 
   set the filename of Player "Piano Player 12" to "/Users/Cyclone/Desktop/Generator/Piano Notes/G#-Ab1.wav" 
   set the filename of Player "Piano Player 13" to "/Users/Cyclone/Desktop/Generator/Piano Notes/A1.wav" 
   set the filename of Player "Piano Player 14" to "/Users/Cyclone/Desktop/Generator/Piano Notes/A#-Bb1.wav" 
   set the filename of Player "Piano Player 15" to "/Users/Cyclone/Desktop/Generator/Piano Notes/B1.wav" 
   set the filename of Player "Piano Player 16" to "/Users/Cyclone/Desktop/Generator/Piano Notes/C2.wav"
   set the filename of Player "Piano Player 17" to "/Users/Cyclone/Desktop/Generator/Piano Notes/C#-Db2.wav"
   set the filename of Player "Piano Player 18" to "/Users/Cyclone/Desktop/Generator/Piano Notes/D2.wav" 
   set the filename of Player "Piano Player 19" to "/Users/Cyclone/Desktop/Generator/Piano Notes/D#-Eb2.wav"
   set the filename of Player "Piano Player 20" to "/Users/Cyclone/Desktop/Generator/Piano Notes/E2.wav" 
   set the filename of Player "Piano Player 21" to "/Users/Cyclone/Desktop/Generator/Piano Notes/F2.wav" 
   set the filename of Player "Piano Player 22" to "/Users/Cyclone/Desktop/Generator/Piano Notes/F#-Gb2.wav"
   set the filename of Player "Piano Player 23" to "/Users/Cyclone/Desktop/Generator/Piano Notes/G2.wav" 
   set the filename of Player "Piano Player 24" to "/Users/Cyclone/Desktop/Generator/Piano Notes/G#-Ab2.wav" 
   set the filename of Player "Piano Player 25" to "/Users/Cyclone/Desktop/Generator/Piano Notes/A2.wav" 
   set the filename of Player "Piano Player 26" to "/Users/Cyclone/Desktop/Generator/Piano Notes/A#-Bb2.wav" 
   set the filename of Player "Piano Player 27" to "/Users/Cyclone/Desktop/Generator/Piano Notes/B2.wav" 
   set the filename of Player "Piano Player 28" to "/Users/Cyclone/Desktop/Generator/Piano Notes/C3.wav"
   set the filename of Player "Piano Player 29" to "/Users/Cyclone/Desktop/Generator/Piano Notes/C#-Db3.wav"
   set the filename of Player "Piano Player 30" to "/Users/Cyclone/Desktop/Generator/Piano Notes/D3.wav" 
   set the filename of Player "Piano Player 31" to "/Users/Cyclone/Desktop/Generator/Piano Notes/D#-Eb3.wav"
   set the filename of Player "Piano Player 32" to "/Users/Cyclone/Desktop/Generator/Piano Notes/E3.wav" 
   set the filename of Player "Piano Player 33" to "/Users/Cyclone/Desktop/Generator/Piano Notes/F3.wav" 
   set the filename of Player "Piano Player 34" to "/Users/Cyclone/Desktop/Generator/Piano Notes/F#-Gb3.wav"
   set the filename of Player "Piano Player 35" to "/Users/Cyclone/Desktop/Generator/Piano Notes/G3.wav" 
   set the filename of Player "Piano Player 36" to "/Users/Cyclone/Desktop/Generator/Piano Notes/G#-Ab3.wav" 
   set the filename of Player "Piano Player 37" to "/Users/Cyclone/Desktop/Generator/Piano Notes/A3.wav" 
   set the filename of Player "Piano Player 38" to "/Users/Cyclone/Desktop/Generator/Piano Notes/A#-Bb3.wav" 
   set the filename of Player "Piano Player 39" to "/Users/Cyclone/Desktop/Generator/Piano Notes/B3.wav" 
   set the filename of Player "Piano Player 40" to "/Users/Cyclone/Desktop/Generator/Piano Notes/C4.wav"
   set the filename of Player "Piano Player 41" to "/Users/Cyclone/Desktop/Generator/Piano Notes/C#-Db4.wav"
   set the filename of Player "Piano Player 42" to "/Users/Cyclone/Desktop/Generator/Piano Notes/D4.wav" 
   set the filename of Player "Piano Player 43" to "/Users/Cyclone/Desktop/Generator/Piano Notes/D#-Eb4.wav"
   set the filename of Player "Piano Player 44" to "/Users/Cyclone/Desktop/Generator/Piano Notes/E4.wav" 
   set the filename of Player "Piano Player 45" to "/Users/Cyclone/Desktop/Generator/Piano Notes/F4.wav" 
   set the filename of Player "Piano Player 46" to "/Users/Cyclone/Desktop/Generator/Piano Notes/F#-Gb4.wav"
   set the filename of Player "Piano Player 47" to "/Users/Cyclone/Desktop/Generator/Piano Notes/G4.wav" 
   set the filename of Player "Piano Player 48" to "/Users/Cyclone/Desktop/Generator/Piano Notes/G#-Ab4.wav" 
   set the filename of Player "Piano Player 49" to "/Users/Cyclone/Desktop/Generator/Piano Notes/A4.wav" 
   set the filename of Player "Piano Player 50" to "/Users/Cyclone/Desktop/Generator/Piano Notes/A#-Bb4.wav" 
   set the filename of Player "Piano Player 51" to "/Users/Cyclone/Desktop/Generator/Piano Notes/B4.wav" 
   set the filename of Player "Piano Player 52" to "/Users/Cyclone/Desktop/Generator/Piano Notes/C5.wav"
   set the filename of Player "Piano Player 53" to "/Users/Cyclone/Desktop/Generator/Piano Notes/C#-Db5.wav"
   set the filename of Player "Piano Player 54" to "/Users/Cyclone/Desktop/Generator/Piano Notes/D5.wav" 
   set the filename of Player "Piano Player 55" to "/Users/Cyclone/Desktop/Generator/Piano Notes/D#-Eb5.wav"
   set the filename of Player "Piano Player 56" to "/Users/Cyclone/Desktop/Generator/Piano Notes/E5.wav" 
   set the filename of Player "Piano Player 57" to "/Users/Cyclone/Desktop/Generator/Piano Notes/F5.wav" 
   set the filename of Player "Piano Player 58" to "/Users/Cyclone/Desktop/Generator/Piano Notes/F#-Gb5.wav"
   set the filename of Player "Piano Player 59" to "/Users/Cyclone/Desktop/Generator/Piano Notes/G5.wav" 
   set the filename of Player "Piano Player 60" to "/Users/Cyclone/Desktop/Generator/Piano Notes/G#-Ab5.wav" 
   set the filename of Player "Piano Player 61" to "/Users/Cyclone/Desktop/Generator/Piano Notes/A5.wav" 
   set the filename of Player "Piano Player 62" to "/Users/Cyclone/Desktop/Generator/Piano Notes/A#-Bb5.wav" 
   set the filename of Player "Piano Player 63" to "/Users/Cyclone/Desktop/Generator/Piano Notes/B5.wav" 
   set the filename of Player "Piano Player 64" to "/Users/Cyclone/Desktop/Generator/Piano Notes/C6.wav"
   set the filename of Player "Piano Player 65" to "/Users/Cyclone/Desktop/Generator/Piano Notes/C#-Db6.wav"
   set the filename of Player "Piano Player 66" to "/Users/Cyclone/Desktop/Generator/Piano Notes/D6.wav" 
   set the filename of Player "Piano Player 67" to "/Users/Cyclone/Desktop/Generator/Piano Notes/D#-Eb6.wav"
   set the filename of Player "Piano Player 68" to "/Users/Cyclone/Desktop/Generator/Piano Notes/E6.wav" 
   set the filename of Player "Piano Player 69" to "/Users/Cyclone/Desktop/Generator/Piano Notes/F6.wav" 
   set the filename of Player "Piano Player 70" to "/Users/Cyclone/Desktop/Generator/Piano Notes/F#-Gb6.wav"
   set the filename of Player "Piano Player 71" to "/Users/Cyclone/Desktop/Generator/Piano Notes/G6.wav" 
   set the filename of Player "Piano Player 72" to "/Users/Cyclone/Desktop/Generator/Piano Notes/G#-Ab6.wav" 
   set the filename of Player "Piano Player 73" to "/Users/Cyclone/Desktop/Generator/Piano Notes/A6.wav" 
   set the filename of Player "Piano Player 74" to "/Users/Cyclone/Desktop/Generator/Piano Notes/A#-Bb6.wav" 
   set the filename of Player "Piano Player 75" to "/Users/Cyclone/Desktop/Generator/Piano Notes/B6.wav" 
   set the filename of Player "Piano Player 76" to "/Users/Cyclone/Desktop/Generator/Piano Notes/C7.wav"
   set the filename of Player "Piano Player 77" to "/Users/Cyclone/Desktop/Generator/Piano Notes/C#-Db7.wav"
   set the filename of Player "Piano Player 78" to "/Users/Cyclone/Desktop/Generator/Piano Notes/D7.wav" 
   set the filename of Player "Piano Player 79" to "/Users/Cyclone/Desktop/Generator/Piano Notes/D#-Eb7.wav"
   set the filename of Player "Piano Player 80" to "/Users/Cyclone/Desktop/Generator/Piano Notes/E7.wav" 
   set the filename of Player "Piano Player 81" to "/Users/Cyclone/Desktop/Generator/Piano Notes/F7.wav" 
   set the filename of Player "Piano Player 82" to "/Users/Cyclone/Desktop/Generator/Piano Notes/F#-Gb7.wav"
   set the filename of Player "Piano Player 83" to "/Users/Cyclone/Desktop/Generator/Piano Notes/G7.wav" 
   set the filename of Player "Piano Player 84" to "/Users/Cyclone/Desktop/Generator/Piano Notes/G#-Ab7.wav" 
   set the filename of Player "Piano Player 85" to "/Users/Cyclone/Desktop/Generator/Piano Notes/A7.wav" 
   set the filename of Player "Piano Player 86" to "/Users/Cyclone/Desktop/Generator/Piano Notes/A#-Bb7.wav" 
   set the filename of Player "Piano Player 87" to "/Users/Cyclone/Desktop/Generator/Piano Notes/B7.wav" 
   set the filename of Player "Piano Player 88" to "/Users/Cyclone/Desktop/Generator/Piano Notes/C8.wav" 
   
   unlock screen
end preOpenStack
       a K?9                     U Helvetica Neue   U Helvetica Neue,unicode   U Helvetica,unicode   U Lucida Grande   U Lucida Grande,unicode   U Helvetica Neue   U Helvetica Neue,unicode  cRevStandaloneSettings    %OSX,longVersion  Untitled 1 1.0.0.0Windows,productversion1  1
askDialog  trueOSX,copyright  #2015  All rights reserved worldwideWindows,ProductName  
Untitled 1Windows,productversion3  0scriptLibraries  Internet
Geometry
PrintingUNIX,fileSelector  trueOSX,identifier  com..untitled1Windows,fileversion4  0inclusions  searchWindows,documenticonFile  /Users/Cyclone/Applications/LiveCode Community 8.0 (dp 1).app/Contents/Tools/Runtime/Windows/x86-32/Support/Sample Icons/genericdoc.icoOSX,shortVersion  1.0.0.0OSX,documentExtension   name  
Untitled 1	OSX,name  
Untitled 1MacOSX x86-32  trueWindows,fileversion2  0Windows  trueLinux  falseWindows,FileDescription  Untitled 1 1.0.0.0 for WindowsWindows,productversion2  0UNIX,pageSetup  trueOSX,signature  ????	OSX,info  Untitled 1 Version 1.0.0.0Windows,productversion4  0Windows,companyname   Windows,fileversion1  1OSX,documentType   Windows,fileversion3  0UNIX,colorChooser  trueUNIX,printerChooser  true
answerDialog  trueWindows,iconFile  /Users/Cyclone/Applications/LiveCode Community 8.0 (dp 1).app/Contents/Tools/Runtime/Windows/x86-32/Support/Sample Icons/genericapp.icodefaultBuildFolder  /Users/Cyclone/Desktopcursors  falseWindows,LegalCopyright  #2015  All rights reserved worldwide cREVGeometryCache    stackID  1381 cREVGeneral    breakpoints   breakpointstates   scripteditorselection  0breakpointconditions   scripteditorvscroll  0stackfileversion  7.0scalefactor  1      	P
on preOpenCard
   lock screen
   set the blendLevel of field "Sheet Music Measure Lines" to 15
   set the blendLevel of grc "Sheet Music Playhead Drag Box" to 90
   set the layer of grc "Playhead" to -1
   unlock screen
end preOpenCard


on rawKeyDown theKey
   lock screen
   
   switch theKey
      --case 65288 -- Delete
         put the hilitedLines of field "Note Database" into iList.hLines
         sort items of iList.hLines descending numeric 
         repeat for each item lineNum in iList.hLines
            put line lineNum of field "Note Database" into Current_Line
            delete grc ((item 1 of Current_Line) && (item 2 of Current_Line))
            delete line lineNum of field "Note Database"
         end repeat
         break
      --case 32 -- Space
         --send mouseUp to button "Play" /*start/stop, need to add*/ break
      default 
         pass rawKeyDown break
   end switch
   
   unlock screen
end rawKeyDown


on playPitch s.noteName
   
   if quote is among the chars of s.noteName /* remove quotes, -> "note #" to note # */
   then put char 2 to -2 of word 2 of s.noteName into w.Name
   else put s.noteName into w.Name
   switch /* save variables -> (type, num) */
      case the number of words in s.noteName is 2 
         put word 1 of w.Name into w.Type 
         put word 2 of w.Name into n.Num break
      case the number of words in s.noteName is 1 
         put "Note" into w.Type
         put word 1 of w.Name into n.Num break
   end switch
   
   -- Play Note
   if w.Type is "Note" then
      put findPitch(n.Num) into thePitch
      put "Piano" into theInstrument
      set the currentTime of player (theInstrument && "Player" && thePitch) to 0 
      start player ("Piano Player" && thePitch)
   end if
   
end playPitch


function findPitch n.Num
   put field "Note Database" into f.Note_Database
   put field "Chromatic Pitches" into f.Chromatic_Pitches
   
   put 0 into counter
   repeat until (item 2 of line counter of f.Note_Database is n.Num)
      add 1 to counter
   end repeat
   put line (item 3 of line counter of f.Note_Database) of field "Sheet Music Pitches Display" into theName
   
   put 0 into counter
   repeat until line counter of f.Chromatic_Pitches is theName
      add 1 to counter
   end repeat
   put counter into thePitch
   
   return thePitch
end findPitch


on noteClicked s.noteName
   lock screen
   
   -- Play Note
   send playPitch && s.noteName to me
   
   put char 2 to -2 of word 2 of s.noteName into w.Name
   put word 1 of w.Name into w.Type
   put word 2 of w.Name into n.Num
   
   -- Select Note(s)
   put 0 into c.lineNum
   repeat until (item 1 of line c.lineNum of field "Note Database" is w.Type) and (item 2 of line c.lineNum of field "Note Database" is n.Num) or c.lineNum is (the number of lines in field "Note Database")
      add 1 to c.lineNum
   end repeat
   
   put the hilitedLines of field "Note Database" into iList.hLines
   
   switch
      case the keysDown contains 65505
         if c.lineNum is not among the items of iList.hLines
         then set the hilitedLine of field "Note Database" to iList.hLines & "," & c.lineNum
         else 
            repeat for each item i.Current in iList.hLines
               if i.Current is not c.lineNum
               then put i.Current & "," after iList.Lines
            end repeat
            set the hilitedLines of field "Note Database" to iList.Lines
         end if
         break
      default
         set the hilitedLine of field "Note Database" to c.lineNum 
   end switch
   unlock screen
end noteClicked
          ?9     cREVGeneral    scripteditorselection  3469debugParameters   debugEntryHandler  
M,preOpenCardscripteditorvscroll  1331 cREVGeometryCacheIDs    1432090926642  10891432570193478  11631432570193483  11681432570193507  11921432570193474  11591432570193461  11461432570193445  11301432581912899  12961432585298025  13151432570193523  12081432138237987  10901432606945692  13261432570193503  11881432570193438  11231432570193450  11351432570193493  11781432583018481  13131432138237994  11051431980040853  10511432138241588  10921432070386638  10831432066706489  10741432606945701  13421432138237983  10911432570193470  11551432608085258  13521432570193513  11981432138237990  10991431980040857  10561432607724013  13511432570193462  11471432570193480  11651432606945696  13371432570193442  11271432570193457  11421432570193497  11821431977417618  10431432570193488  11731432570193466  11511432570193446  11311432570193517  12021432585298026  13161432570193522  12071432570217324  12121432570193484  11691432606945693  13271432570193473  11581432570193502  11871433297844345  13811432570193437  11221432570193453  11381432570193492  11771431980040850  10051431977446302  10461432138237988  10951432311040807  11121432570193477  11621431980040858  10581432138237993  11031432854756605  13741431980040854  10521432069874256  10801432607722667  13501432570193481  11661432606945697  13381432570193506  11911432570193514  11991432570193443  11281432570193496  11811432247418659  11101432066706490  10751431981204633  10631432578436919  12681432570193489  11741432606945702  13431432069836746  10791432570193467  11521431996329706  10731432570193447  11321432570193510  11951432585298027  13231432314813704  11161432068189670  10771432570193485  11701432570193472  11571432606945690  13241432570193518  12031433297844344  13801432570193452  11371432090922776  10881432570193463  11481432070344959  10821432606945698  13391432570193505  11901432570193476  11611432570193509  11941432581912897  12941432570193495  11801432570193456  11411432570193499  11841431980040849  10031432138237992  11021431980040855  10541432570193525  12101431977467891  10471432570193482  11671432138237985  10931432606945694  13351432993420778  13771432570193501  11861432570193515  12001432570193444  11291432581912898  12951432570193491  11761432570193521  12061432606945703  13731432570193464  11491432570193448  11331432570193511  11961432069892640  10811432068429949  10781431980040851  10061432570193486  11711432570193468  11531432138237989  10981432570193471  11561432608159791  13531432570193440  11251432570193519  12041432570193459  11441432570193455  11401431977434734  10451432912148262  13751432570193460  11451432570193479  11641432606945699  13401432570193504  11891432570193475  11601432570193508  11931432070860421  10851432585298024  13141432570193498  11831432247596771  11111432570193524  12091432606945704  13481432608387432  13541432138237986  10941432606945695  13361432570193500  11851432570193516  12011432569197655  11191432570193439  11241432570193451  11361432570193490  11751432138237995  11061431980040852  10501432138241589  10961432570193520  12051432606945700  13411432570193465  11501432606945691  13251432569042693  11171432570193449  11341432570193512  11971432138237991  11001431980040856  10551432570193487  11721431977198007  10221432570193469  11541432570193441  11261432570193458  11431432570193454  11391432570193494  1179 cREVGeometrycache    total  173order  
                                 "  1  '  2  3  5  6  7  8  :  ;  =  @  A  B  C  D  E  F  G  H  J  K  L  N  O  Q  R  V  W  X  \  ]    b  c  d  e  f  g  h  i  j  k  l  m  n  o  p  q  r  s  t  u  v  w  x  y  z  {  |  }  ~                                                                                                                                !  "  #  $  +  ,  -  .  /  7  8  9  :  ;  <  =  >  ?  D  F  G  H  I  J  ]  9  ^  _  a  d  e  _   	Copy Box  K@     ] O F        cREVGeneral    revUniqueID  
1431980040849
   Note Database )h        # l        :on mouseDown
   lock screen
   
   if the hilitedLines of me is not "" then
      repeat for each item n.lineNum in the hilitedLines of me
         send mouseUp to grc ( (item 1 of line n.lineNum of me) && (item 2 of line n.lineNum of me) )
      end repeat
   end if
   
   unlock screen
end mouseDown
                cREVGeneral    revUniqueID  
1431980040850scripteditorvscroll  0scripteditorselection  302   # N o t e , 1 , 1 0 , 2 . 5 , 3 , 1 
'      " # N o t e , 2 , 7 , 3 , 3 . 7 5 , 1 
'      " # N o t e , 3 , 7 , 4 . 2 5 , 5 , 1 
'      " # N o t e , 4 , 8 , 3 . 7 5 , 4 , 1 
'      " # N o t e , 5 , 1 0 , 5 , 6 . 5 , 1 
'      " # N o t e , 6 , 1 0 , 6 . 5 , 7 , 1 
'      " # N o t e , 7 , 6 , 7 , 7 . 7 5 , 1 
'      " # N o t e , 8 , 8 , 7 . 7 5 , 8 , 1 
'      " # N o t e , 9 , 7 , 8 , 1 0 . 5 , 1 
'      " ) N o t e , 1 0 , 1 0 , 1 0 . 5 , 1 1 , 1 
'      ( ) N o t e , 1 1 , 7 , 1 1 , 1 1 . 7 5 , 1 
'      ( ) N o t e , 1 2 , 8 , 1 1 . 7 5 , 1 2 , 1 
'      ( # N o t e , 1 3 , 7 , 1 2 , 1 3 , 1 
'      " ) N o t e , 1 4 , 1 0 , 1 3 , 1 4 . 5 , 1 
'      ( ) N o t e , 1 5 , 1 0 , 1 4 . 5 , 1 5 , 1 
'      ( ) N o t e , 1 6 , 7 , 1 5 , 1 5 . 7 5 , 1 
'      ( ) N o t e , 1 7 , 8 , 1 5 . 7 5 , 1 6 , 1 
'      ( # N o t e , 1 8 , 7 , 1 6 , 1 8 , 1 
'      "  B    	`        m     
Rectangle  K@      P         cREVGeneral    revUniqueID  
1431980040851   
Rectangle  K@               cREVGeneral    revUniqueID  
1431977198007   
Rectangle  K@               cREVGeneral    revUniqueID  
1431977417618   
Rectangle  K@     q 
         cREVGeneral    revUniqueID  
1431977434734   
Rectangle  K@     ]          cREVGeneral    revUniqueID  
1431977446302   
Rectangle  K@     @         cREVGeneral    revUniqueID  
1431977467891   Zoom Scrollbar  qon scrollbarDrag n.Value
   lock screen
   switch n.Value
      case "3" put "1" into field "Zoom Display" break
      case "2" put "0.5" into field "Zoom Display" break
      case "1" put "0.25" into field "Zoom Display" break
   end switch
   unlock screen
end scrollbarDrag
       G )         1  3        cREVGeneral    scripteditorvscroll  0scripteditorselection  183revUniqueID  
1431980040852
   	lbl Zoom M         7                        cREVGeneral    revUniqueID  
1431980040853     
 Z o o m   : 
'      
   
Zoom Display  +h        3 (                        cREVGeneral    revUniqueID  
1431980040854   	 0 . 2 5 
'      
   lbl Note Database M         W e                        cREVGeneral    revUniqueID  
1431980040855      N o t e   D a t a b a s e   : 
'      
   Note Catagories  )h        #R                         cREVGeneral    revUniqueID  
1431980040856   ? t y p e , n u m b e r , x , y S t a r t , y E n d , i n s t r 
'      >
    Sheet Music )k         kR   maxEditableColumns   basicTableObject  truecellFormatting  false                    ( cREVGeneral    revUniqueID  
1431980040857scripteditorvscroll  0scripteditorselection  0    
'             
  " 
lbl Copy Box M       G G                        cREVGeneral    revUniqueID  
1431980040858      C o p y   B o x   : 
'      
  1 Sheet Music Measure Lines )i       P *   maxEditableColumns   basicTableObject  truecellFormatting  false  on rawKeyDown theKey
   lock screen
   switch theKey
      case 65308 send scrollbarDrag && (the thumbpos of scrollbar "Sheet Music Vertical Scrollbar") - 1 to scrollbar "Sheet Music Vertical Scrollbar" break
      case 65309 send scrollbarDrag && (the thumbpos of scrollbar "Sheet Music Vertical Scrollbar") + 1 to scrollbar "Sheet Music Vertical Scrollbar" break
      --!!case "left" break
      --!!case "right" break
      default pass rawKeyDown break
   end switch
   unlock screen
end rawKeyDown


on mouseDown
   lock screen
   
   put the width of grc "Note Copy" into xWidth
   put the height of grc "Note Copy" into yWidth
   put 7 into leftAdjust
   put 1 into topAdjust
   
   switch
      case mouse(1) is Down send noteClicked to this card break
      case mouse(3) is Down 
         
         put item 1 of the mouseLoc - the left of me - leftAdjust into xCor
         put item 2 of the mouseLoc - the top of me - topAdjust into yCor
         
         put 0 into c.X
         repeat until xCor >= ((c.X-1)*xWidth) and xCor < (c.X*xWidth)
            add 1 to c.X
         end repeat
         put the left of me + (the width of grc "Note Copy") * c.X into n.xCor
         
         put 0 into c.Y
         repeat until yCor >= ((c.Y-1)*yWidth) and yCor < (c.Y*yWidth)
            add 1 to c.Y
         end repeat
         put the top of me + (the height of grc "Note Copy") * c.Y into n.yCor
         
         put "Note" into d.Type
         
         put 1 into counter
         repeat until exists(grc ("Note" && counter)) is False
            add 1 to counter
         end repeat
         put counter into d.Number
         
         put c.Y into d.x
         put c.X - 1 into d.yStart
         put c.X into d.yEnd
         put "1" into d.Instrument
         
         copy grc "Note Copy"
         paste
         set the name of grc "Note Copy" to ("Note" && d.Number)
         set the layer of grc ("Note" && d.Number) to "-1"
         set the loc of grc ("Note" && d.Number) to n.xCor - 12, n.yCor - 8
         
         if field "Note Database" is not ""
         then put cr & d.Type & "," & d.Number & "," & d.x & "," & d.yStart & "," & d.yEnd & "," & d.Instrument after field "Note Database"
         else put d.Type & "," & d.Number & "," & d.x & "," & d.yStart & "," & d.yEnd & "," & d.Instrument after field "Note Database"
         
         send playPitch && d.Number to this card
         
         break
   end switch
   
   unlock screen
end mouseDown


-- Multi Movement
/*
put item 1 of the mouseLoc - the left of me - leftAdjust into xCor
put item 2 of the mouseLoc - the top of me - topAdjust into yCor

put 0 into c.X
repeat until xCor >= ((c.X-1)*xWidth) and xCor < (c.X*xWidth)
   add 1 to c.X
end repeat

put 0 into c.Y
repeat until yCor >= ((c.Y-1)*yWidth) and yCor < (c.Y*yWidth)
   add 1 to c.Y
end repeat

put field "Note Database" into f.Note_Database
put the hilitedLines of field "Note Database" into iList.hilitedLines

repeat for each item i.Current in iList.hilitedLines
   put line i.Current of f.Note_Database & cr after List.xLines
   put line i.Current of f.Note_Database & cr after List.yLines
end repeat

sort lines of List.yLines ascending numeric by item 3 of each
sort lines of List.xLines ascending numeric by item 4 of each

-- If below highest, then lowest

-- Highest
put c.y - item 3 of line 1 of List.yLines into yMove
put (c.x - 1) - item 4 of line 1 of List.xLines into xMove

repeat for each item i.Current in iList.hilitedLines
   put line i.Current of f.Note_Database into Current_Line
   put item 1 of Current_Line into w.Type
   put item 2 of Current_Line into n.Num
   put item 1 of the loc of grc (w.Type && n.Num) into xCor
   put item 2 of the loc of grc (w.Type && n.Num) into yCor
   set the loc of grc (w.Type && n.Num) to ( (xMove * xWidth) + xCor , (yMove * yWidth) + yCor )
   put c.Y into item 3 of Current_Line
   put c.X into item 5 of Current_Line
   put (c.X - 1) into item 4 of Current_Line
   put Current_Line into line i.Current of f.Note_Database
end repeat
put f.Note_Database into field "Note Database"
*/
                  cREVGeneral    revUniqueID  
1431996329706scripteditorselection  403debugParameters   debugEntryHandler  M,mouseDownscripteditorvscroll  0    
'       
  ' Sheet Music Pitches Display  +h         ~ !                      cREVGeneral    revUniqueID  
1431981204633scripteditorvscroll  0scripteditorselection  0    C 6 
'        B 5 
'        A 5 
'        G 5 
'        F 5 
'        E 5 
'        D 5 
'        C 5 
'        B 4 
'        A 4 
'        G 4 
'        F 4 
'        E 4 
'        D 4 
'        C 4 
'        B 3 
'        A 3 
'        G 3 
'        F 3 
'        E 3 
'        D 3 
'        C 3 
'        B 2 
'        A 2 
'        G 2 
'        F 2 
'        E 2 
'        D 2 
'        C 2 
'        B 1 
'        A 1 
'        G 1 
'        F 1 
'        E 1 
'        D 1 
'        C 1 
'            
  2 Debug  )h        F  A                       cREVGeneral    revUniqueID  
1432066706489scripteditorvscroll  0scripteditorselection  0   + f f s d d d s s f s s f d s f f s d d f s 
'      *
  3 lbl Debug : M         9                        cREVGeneral    revUniqueID  
1432066706490      D e b u g   : 
'        5  %g                                                cREVGeneral    revUniqueID  
1432068189670scripteditorvscroll  0scripteditorselection  14	       6 Debug phon mouseUp
   
  put keysDown() into field "Debug"
   
end mouseUp

-- make players
/*
lock screen
repeat with x = 0 to 88
   create player ("Piano Player" && x)
   set the height of player ("Piano Player" && x) to 30
   set the width of player ("Piano Player" && x) to 35
   set the loc of player ("Piano Player" && x) to 100,100
end repeat
unlock screen
*/
     @ F R                                       cREVGeneral    revUniqueID  
1432068429949scripteditorvscroll  0scripteditorselection  34	     
  7 Sheet Music Measure Numbers  )h        k"                       cREVGeneral    revUniqueID  
1432069836746scripteditorvscroll  0scripteditorselection  0                   1                   2                   3                     4                     5                   6                   7                     8                     9                 1 0               1 1                 1 2                 1 3               1 4                 1 5               1 6                 1 7               1 8               1 9             2 0 
'    
  8 Field  +h         l !                        cREVGeneral    revUniqueID  
1432069874256    
'         : !Sheet Music Horizontal Scrollbar  iqlocal n.Previous = 1

on scrollbarDrag n.New
   lock screen
   
   put field "Note Database" into f.Note_Database
   
   if n.New is not n.Previous then
      
      if n.New < n.Previous
      then put (the width of grc "Note Copy") into n.Adjust
      else put ((the width of grc "Note Copy") * -1) into n.Adjust
      
      put 1 into counter
      repeat until abs(n.New - counter) <= n.Previous
         add 1 to counter
      end repeat
      
      repeat for each line Current_Line in f.Note_Database
         add 1 to lineNum
         
         put item 1 of Current_Line into w.Type
         put item 2 of Current_Line into n.Num
         set the loc of grc (w.Type && n.Num) to item 1 of the loc of grc (w.Type && n.Num) + (n.Adjust*counter), item 2 of the loc of grc (w.Type && n.Num)
         
         switch
            case n.Adjust contains "-"
               add counter to item 4 of line lineNum of f.Note_Database
               add counter to item 5 of line lineNum of f.Note_Database break
            default
               add counter*-1 to item 4 of line lineNum of f.Note_Database
               add counter*-1 to item 5 of line lineNum of f.Note_Database 
         end switch
         put f.Note_Database into field "Note Database"
         
         switch
            case the right of grc (w.Type && n.Num) > the right of field "Sheet Music Measure Lines"
            case the left of grc (w.Type && n.Num) < the left of field "Sheet Music Measure Lines"
               set the visible of grc (w.Type && n.Num) to False break
            default set the visible of grc (w.Type && n.Num) to True break
         end switch
         
      end repeat
      
      put n.New into n.Previous
      
   end if
   unlock screen
end scrollbarDrag
      t2       9 S9 1  50        cREVGeneral    revUniqueID  
1432070344959scripteditorvscroll  168scripteditorselection  444  ; Sheet Music Vertical Scrollbar  ipslocal n.Previous = 1

on scrollbarDrag n.New
   lock screen
   
   put field "Note Database" into f.Note_Database
   
   if n.New is not n.Previous then
      
      if n.New < n.Previous
      then put (the height of grc "Note Copy") into n.Adjust
      else put ((the height of grc "Note Copy") * -1) into n.Adjust
      
      put 1 into counter
      repeat until abs(n.New - counter) <= n.Previous
         add 1 to counter
      end repeat
      
      repeat for each line Current_Line in f.Note_Database
         add 1 to lineNum
         
         put item 1 of Current_Line into w.Type
         put item 2 of Current_Line into n.Num
         set the loc of grc (w.Type && n.Num) to item 1 of the loc of grc (w.Type && n.Num), item 2 of the loc of grc (w.Type && n.Num) + (n.Adjust*counter)
         
         switch
            case n.Adjust contains "-" 
               add (counter*-1) to item 3 of line lineNum of f.Note_Database 
               break
            default 
               add counter to item 3 of line lineNum of f.Note_Database
         end switch
         put f.Note_Database into field "Note Database"
         
         switch
            case the top of grc (w.Type && n.Num) < the top of field "Sheet Music Pitches Display" 
            case the bottom of grc (w.Type && n.Num) > the bottom of field "Sheet Music Pitches Display" 
               set the visible of grc (w.Type && n.Num) to False break
            default set the visible of grc (w.Type && n.Num) to True break
         end switch
         
      end repeat
      
      put n.New into n.Previous
      
   end if
   unlock screen
end scrollbarDrag
      5 k       
y  
y 1  20        cREVGeneral    revUniqueID  
1432070386638scripteditorvscroll  0scripteditorselection  44  = Realign won mouseUp
   lock screen
   
   set the bottom of field "Sheet Music Pitches Display" to the top of grc "Sheet Music Bottom Border" + 3
   set the bottom of grc "Sheet Music Left Border" to the top of grc "Sheet Music Bottom Border"
   set the left of grc "Sheet Music Pitches Display Right Line" to the right of field "Sheet Music Pitches Display" - 2
   
   set the left of field "Sheet Music Measure Numbers" to the right of field "Sheet Music Pitches Display" - 1
   set the right of grc "Sheet Music Left Border" to the left of field "Sheet Music Pitches Display" + 2
   
   set the left of field "Sheet Music Measure Lines" to the left of field "Sheet Music" + 40 
   set the top of field "Sheet Music Measure Lines" to the top of field "Sheet Music" + 23
   
   set the left of grc "Playhead" to the left of field "Sheet Music Measure Lines" + 6
   set the top of grc "Playhead" to the top of field "Sheet Music Measure Numbers" + 2
   
   set the top of grc "Sheet Music Playhead Drag Box" to the top of field "Sheet Music Measure Numbers"
   set the left of grc "Sheet Music Playhead Drag Box" to the left of field "Sheet Music Measure Numbers"
   
   unlock screen
end mouseUp
       R                                       cREVGeneral    revUniqueID  
1432070860421scripteditorvscroll  0scripteditorselection  1001	     
  @ Field  )h                                cREVGeneral    revUniqueID  
1432090922776   # I n s t r u m e n t   N u m b e r 
      "  
        i M o v e   m u l t i p l e   s e l e c t i o n s   a c c o r d i n g   t o   m o u s e   p o s i t i o n 
      h  
         M o v e   N o t e s 
        
        + N o t e   B o r d e r   H i g h l i g h t 
      *  
        e C o m m a n d   C   /   C o m m a n d   V   ( n o   o v e r l a p   s a m e   i n s t r u m e n t ) 
      d  
         C h a n g e   K e y 
        
         F l a t / S h a r p 
        
         S c r o l l b a r s 
        
        	 Z o o m 
        
        9 B o t t o m   r i g h t   s q u a r e   r e s i z i n g 
      8  
         P l a y   S o n g 
        
        / C h o r d   L o c k   ( C h o r d   M o v e ) 
      .  F u n c t i o n s 
         O v e r l a y 
         U    	`        
  A lbl To Do's : M        n 9                        cREVGeneral    revUniqueID  
1432090926642      T o   D o ' s   : 
'        B 	Song-Key m        #  f        on menuPick
   lock screen
   
   put the label of me into selected_item
   
   put selected_item into field "Song Key"
   
   set the label of me to char 2 to -2 of word 2 of the name of me
   
   send mouseUp to btn "Get Key Pitches"
      
   unlock screen
end menuPick
                                 	Song-Key    ,C
C#
Db
D
D#
Eb
E
F
F#
Gb
G
G#
Ab
A
A#
Bb
B         cREVGeneral    revUniqueID  
1432138237987scripteditorvscroll  0scripteditorselection  120	     
  C 	Song Key  ;h          !                       cREVGeneral    revUniqueID  
1432138237983    C 
'        D 
Song-Mode m        # 1 f       on menuPick
   lock screen
   
   put the label of me into selected_item
   
   switch selected_item
      case "Major/Ionian" put "Major" into field "Song Mode" break
      case "Dorian" put "Dorian" into field "Song Mode" break
      case "Phrygian" put "Phrygian" into field "Song Mode" break
      case "Lydian" put "Lydian" into field "Song Mode" break
      case "Mixolydian" put "Mixolydian" into field "Song Mode" break
      case "Natural Minor/Aeolian" put "Natural Minor" into field "Song Mode" break
      case "Locrian" put "Locrian" into field "Song Mode" break
   end switch
   
   set the label of me to char 2 to -2 of word 2 of the name of me
   
   send mouseUp to btn "Get Key Pitches"
   
   unlock screen
end menuPick
                                 
Song-Mode    MMajor/Ionian
Dorian
Phrygian
Lydian
Mixolydian
Natural Minor/Aeolian
Locrian         cREVGeneral    revUniqueID  
1432138241588scripteditorvscroll  0scripteditorselection  134	     
  E 
Song Mode  ;h         2 G                       
cREVTable    currentview  Natural cREVGeneral    revUniqueID  
1432138237985    M a j o r 
'      
  F 
Rectangle  K       P   i                   cREVGeneral    revUniqueID  
1432138237986  G Get Key Pitches Eh         _       	on mouseUp
   lock screen
   set the caseSensitive to true
   set the itemDel to "-"
   
   -- put line 1 of field "Current Pitch Numbers" into field "Current Key Starting Pitch" /* used for transposing
   
   put field "Song Mode" into Song_Mode
   put field "Song Key" into Song_Key
   put field "Chromatic Pitches" into List_of_Pitches
   
   switch Song_Mode
      case "Major" put "2 2 1 2 2 2 1" into Mode_Intervals break
      case "Dorian" put "2 1 2 2 2 1 2" into Mode_Intervals break
      case "Phrygian" put "1 2 2 2 1 2 2" into Mode_Intervals break
      case "Lydian" put "2 2 2 1 2 2 1" into Mode_Intervals break
      case "Mixolydian" put "2 2 1 2 2 1 2" into Mode_Intervals break
      case "Natural Minor" put "2 1 2 2 1 2 2" into Mode_Intervals break
      case "Locrian" put "1 2 2 1 2 2 2" into Mode_Intervals break
   end switch
   
   put "" into Current_Pitch put "3" into Current_Number /*don't allow A0-B0*/
   repeat for the number of lines in List_of_Pitches
      add 1 to Current_Number
      put line Current_Number of List_of_Pitches into Current_Pitch 
      switch
         case the number of chars in Current_Pitch is "2" /*D1*/ if char 1 of Current_Pitch is Song_Key then exit repeat break
         case the number of chars in Current_Pitch is "6" /*C#1-Db1*/ if (char 1 to 2 of Current_Pitch is Song_Key) or (char 4 to 5 of Current_Pitch is Song_Key) then exit repeat break
      end switch
   end repeat
   
   put 0 into wordNum put (the number of lines in List_Of_Pitches) into Highest_Bound
   repeat until Current_Number > Highest_Bound
      put Current_Number & cr after Output
      add 1 to wordNum
      if wordNum > (the number of words in Mode_Intervals) then put 1 into wordNum
      put Current_Number + (word wordNum of Mode_Intervals) into Current_Number
   end repeat
   
   put line 1 to -1 of Output into field "Current Pitch Numbers"
   
   repeat for each line current_line_num in Output
      put line current_line_num of field "Chromatic Pitches" & cr after d.Pitch_Names
   end repeat
   
   put line 1 to -1 of d.Pitch_Names into field "Current Pitch Names"
   
   -- Current Degree Pitches
   repeat for each line current_line in (line 1 to 7 of field "Current Pitch Numbers")
      put char 1 to -2 of line current_line of field "Chromatic Pitches" & cr after d.Current_Degree_Pitches
   end repeat
   put line 1 to -1 of d.Current_Degree_Pitches into field "Current Degree Pitches"
   
   unlock screen
end mouseUp
                                          cREVGeneral    revUniqueID  
1432138237988scripteditorselection  2154debugParameters   debugEntryHandler  	M,mouseUpscripteditorvscroll  452	     
  H Chromatic Pitches 9`      # .             K 
cREVTable    numbertabstops  1
leftfieldloc  834viewablecolumns  1scrollbarwidth  16currenthscroll  0topfieldloc  115
cellxspacing  75currentvscroll  0currentxmouseloc  105
viewablerows  88currentymouseloc  27
cellyspacing  14rightfieldloc  880currentview <p><font face="Lucida Grande" size="11">A0</font></p>
<p><font face="Lucida Grande" size="11">A#-Bb0</font></p>
<p><font face="Lucida Grande" size="11">B0</font></p>
<p><font face="Lucida Grande" size="11">C1</font></p>
<p><font face="Lucida Grande" size="11">C#-Db1</font></p>
<p><font face="Lucida Grande" size="11">D1</font></p>
<p><font face="Lucida Grande" size="11">D#-Eb1</font></p>
<p><font face="Lucida Grande" size="11">E1</font></p>
<p><font face="Lucida Grande" size="11">F1</font></p>
<p><font face="Lucida Grande" size="11">F#-Gb1</font></p>
<p><font face="Lucida Grande" size="11">G1</font></p>
<p><font face="Lucida Grande" size="11">G#-Ab1</font></p>
<p><font face="Lucida Grande" size="11">A1</font></p>
<p><font face="Lucida Grande" size="11">A#-Bb1</font></p>
<p><font face="Lucida Grande" size="11">B1</font></p>
<p><font face="Lucida Grande" size="11">C2</font></p>
<p><font face="Lucida Grande" size="11">C#-Db2</font></p>
<p><font face="Lucida Grande" size="11">D2</font></p>
<p><font face="Lucida Grande" size="11">D#-Eb2</font></p>
<p><font face="Lucida Grande" size="11">E2</font></p>
<p><font face="Lucida Grande" size="11">F2</font></p>
<p><font face="Lucida Grande" size="11">F#-Gb2</font></p>
<p><font face="Lucida Grande" size="11">G2</font></p>
<p><font face="Lucida Grande" size="11">G#-Ab2</font></p>
<p><font face="Lucida Grande" size="11">A2</font></p>
<p><font face="Lucida Grande" size="11">A#-Bb2</font></p>
<p><font face="Lucida Grande" size="11">B2</font></p>
<p><font face="Lucida Grande" size="11">C3</font></p>
<p><font face="Lucida Grande" size="11">C#-Db3</font></p>
<p><font face="Lucida Grande" size="11">D3</font></p>
<p><font face="Lucida Grande" size="11">D#-Eb3</font></p>
<p><font face="Lucida Grande" size="11">E3</font></p>
<p><font face="Lucida Grande" size="11">F3</font></p>
<p><font face="Lucida Grande" size="11">F#-Gb3</font></p>
<p><font face="Lucida Grande" size="11">G3</font></p>
<p><font face="Lucida Grande" size="11">G#-Ab3</font></p>
<p><font face="Lucida Grande" size="11">A3</font></p>
<p><font face="Lucida Grande" size="11">A#-Bb3</font></p>
<p><font face="Lucida Grande" size="11">B3</font></p>
<p><font face="Lucida Grande" size="11">C4</font></p>
<p><font face="Lucida Grande" size="11">C#-Db4</font></p>
<p><font face="Lucida Grande" size="11">D4</font></p>
<p><font face="Lucida Grande" size="11">D#-Eb4</font></p>
<p><font face="Lucida Grande" size="11">E4</font></p>
<p><font face="Lucida Grande" size="11">F4</font></p>
<p><font face="Lucida Grande" size="11">F#-Gb4</font></p>
<p><font face="Lucida Grande" size="11">G4</font></p>
<p><font face="Lucida Grande" size="11">G#-Ab4</font></p>
<p><font face="Lucida Grande" size="11">A4</font></p>
<p><font face="Lucida Grande" size="11">A#-Bb4</font></p>
<p><font face="Lucida Grande" size="11">B4</font></p>
<p><font face="Lucida Grande" size="11">C5</font></p>
<p><font face="Lucida Grande" size="11">C#-Db5</font></p>
<p><font face="Lucida Grande" size="11">D5</font></p>
<p><font face="Lucida Grande" size="11">D#-Eb5</font></p>
<p><font face="Lucida Grande" size="11">E5</font></p>
<p><font face="Lucida Grande" size="11">F5</font></p>
<p><font face="Lucida Grande" size="11">F#-Gb5</font></p>
<p><font face="Lucida Grande" size="11">G5</font></p>
<p><font face="Lucida Grande" size="11">G#-Ab5</font></p>
<p><font face="Lucida Grande" size="11">A5</font></p>
<p><font face="Lucida Grande" size="11">A#-Bb5</font></p>
<p><font face="Lucida Grande" size="11">B5</font></p>
<p><font face="Lucida Grande" size="11">C6</font></p>
<p><font face="Lucida Grande" size="11">C#-Db6</font></p>
<p><font face="Lucida Grande" size="11">D6</font></p>
<p><font face="Lucida Grande" size="11">D#-Eb6</font></p>
<p><font face="Lucida Grande" size="11">E6</font></p>
<p><font face="Lucida Grande" size="11">F6</font></p>
<p><font face="Lucida Grande" size="11">F#-Gb6</font></p>
<p><font face="Lucida Grande" size="11">G6</font></p>
<p><font face="Lucida Grande" size="11">G#-Ab6</font></p>
<p><font face="Lucida Grande" size="11">A6</font></p>
<p><font face="Lucida Grande" size="11">A#-Bb6</font></p>
<p><font face="Lucida Grande" size="11">B6</font></p>
<p><font face="Lucida Grande" size="11">C7</font></p>
<p><font face="Lucida Grande" size="11">C#-Db7</font></p>
<p><font face="Lucida Grande" size="11">D7</font></p>
<p><font face="Lucida Grande" size="11">D#-Eb7</font></p>
<p><font face="Lucida Grande" size="11">E7</font></p>
<p><font face="Lucida Grande" size="11">F7</font></p>
<p><font face="Lucida Grande" size="11">F#-Gb7</font></p>
<p><font face="Lucida Grande" size="11">G7</font></p>
<p><font face="Lucida Grande" size="11">G#-Ab7</font></p>
<p><font face="Lucida Grande" size="11">A7</font></p>
<p><font face="Lucida Grande" size="11">A#-Bb7</font></p>
<p><font face="Lucida Grande" size="11">B7</font></p>
<p><font face="Lucida Grande" size="11">C8</font></p>bottomfieldloc  138 cREVGeneral    revUniqueID  
1432138241589    A 0 
        
 A # - B b 0 
         B 0 
         C 1 
        
 C # - D b 1 
         D 1 
        
 D # - E b 1 
         E 1 
         F 1 
        
 F # - G b 1 
         G 1 
        
 G # - A b 1 
         A 1 
        
 A # - B b 1 
         B 1 
         C 2 
        
 C # - D b 2 
         D 2 
        
 D # - E b 2 
         E 2 
         F 2 
        
 F # - G b 2 
         G 2 
        
 G # - A b 2 
         A 2 
        
 A # - B b 2 
         B 2 
         C 3 
        
 C # - D b 3 
         D 3 
        
 D # - E b 3 
         E 3 
         F 3 
        
 F # - G b 3 
         G 3 
        
 G # - A b 3 
         A 3 
        
 A # - B b 3 
         B 3 
         C 4 
        
 C # - D b 4 
         D 4 
        
 D # - E b 4 
         E 4 
         F 4 
        
 F # - G b 4 
         G 4 
        
 G # - A b 4 
         A 4 
        
 A # - B b 4 
         B 4 
         C 5 
        
 C # - D b 5 
         D 5 
        
 D # - E b 5 
         E 5 
         F 5 
        
 F # - G b 5 
         G 5 
        
 G # - A b 5 
         A 5 
        
 A # - B b 5 
         B 5 
         C 6 
        
 C # - D b 6 
         D 6 
        
 D # - E b 6 
         E 6 
         F 6 
        
 F # - G b 6 
         G 6 
        
 G # - A b 6 
         A 6 
        
 A # - B b 6 
         B 6 
         C 7 
        
 C # - D b 7 
         D 7 
        
 D # - E b 7 
         E 7 
         F 7 
        
 F # - G b 7 
         G 7 
        
 G # - A b 7 
         A 7 
        
 A # - B b 7 
         B 7 
         C 8 
         I    `       $  
  J Chromatic Pitches Label 
       m $ v                       
cREVTable    currentview  List of Pitches : cREVGeneral    revUniqueID  
1432138237989     ' C h r o m a t i c   P i t c h e s   : 
'      &
  K Current Pitch Numbers Label 
       T 8                        
cREVTable    currentview  Current Key Pitches : cREVGeneral    revUniqueID  
1432138237990     / C u r r e n t   P i t c h   N u m b e r s   : 
'      .
  L Current Pitch Numbers 9`      8 .             K 
cREVTable    numbertabstops  1
leftfieldloc  834viewablecolumns  1scrollbarwidth  16currenthscroll  0topfieldloc  137
cellxspacing  75currentvscroll  0currentxmouseloc  125
viewablerows  51currentymouseloc  36
cellyspacing  14rightfieldloc  880currentview  4
6
8
9
11
13
15
16
18
20
21
23
25
27
28
30
32
33
35
37
39
40
42
44
45
47
49
51
52
54
56
57
59
61
63
64
66
68
69
71
73
75
76
78
80
81
83
85
87
88bottomfieldloc  158 cREVGeneral    revUniqueID  
1432138237991    4 
'        6 
'        8 
'        9 
'        1 1 
'        1 3 
'        1 5 
'        1 6 
'        1 8 
'        2 0 
'        2 1 
'        2 3 
'        2 5 
'        2 7 
'        2 8 
'        3 0 
'        3 2 
'        3 3 
'        3 5 
'        3 7 
'        3 9 
'        4 0 
'        4 2 
'        4 4 
'        4 5 
'        4 7 
'        4 9 
'        5 1 
'        5 2 
'        5 4 
'        5 6 
'        5 7 
'        5 9 
'        6 1 
'        6 3 
'        6 4 
'        6 6 
'        6 8 
'        6 9 
'        7 1 
'        7 3 
'        7 5 
'        7 6 
'        7 8 
'        8 0 
'        8 1 
'        8 3 
'        8 5 
'        8 7 
'        8 8 
'        M    `       9  
  N Current Pitch Names Label 
       T M                        
cREVTable    currentview  Current Pitch Names : cREVGeneral    revUniqueID  
1432138237992     + C u r r e n t   P i t c h   N a m e s   : 
'      *
  O Current Pitch Names 9`      M .             K 
cREVTable    numbertabstops  1
leftfieldloc  834viewablecolumns  1scrollbarwidth  16currenthscroll  0topfieldloc  137
cellxspacing  75currentvscroll  0currentxmouseloc  125
viewablerows  51currentymouseloc  36
cellyspacing  14rightfieldloc  880currentview   bottomfieldloc  158 cREVGeneral    revUniqueID  
1432138237993    C 1 
'        D 1 
'        E 1 
'        F 1 
'        G 1 
'        A 1 
'        B 1 
'        C 2 
'        D 2 
'        E 2 
'        F 2 
'        G 2 
'        A 2 
'        B 2 
'        C 3 
'        D 3 
'        E 3 
'        F 3 
'        G 3 
'        A 3 
'        B 3 
'        C 4 
'        D 4 
'        E 4 
'        F 4 
'        G 4 
'        A 4 
'        B 4 
'        C 5 
'        D 5 
'        E 5 
'        F 5 
'        G 5 
'        A 5 
'        B 5 
'        C 6 
'        D 6 
'        E 6 
'        F 6 
'        G 6 
'        A 6 
'        B 6 
'        C 7 
'        D 7 
'        E 7 
'        F 7 
'        G 7 
'        A 7 
'        B 7 
'        C 8 
'        P    `       N  
  Q Current Degree Pitches Label 
       N `                        
cREVTable    currentview  Current Degree Pitches : cREVGeneral    revUniqueID  
1432138237994     1 C u r r e n t   D e g r e e   P i t c h e s   : 
'      0
  R Current Degree Pitches 9`      b .             K 
cREVTable    numbertabstops  1
leftfieldloc  834viewablecolumns  1scrollbarwidth  16currenthscroll  0topfieldloc  137
cellxspacing  75currentvscroll  0currentxmouseloc  125currentymouseloc  36
viewablerows  51
cellyspacing  14rightfieldloc  880currentview  41,C#1-Db
2,D#1-Eb
3,F
4,F#1-Gb
5,G#1-Ab
6,A#1-Bb
7,Cbottomfieldloc  158 cREVGeneral    revUniqueID  
1432138237995    C 
'        D 
'        E 
'        F 
'        G 
'        A 
'        B 
'        S    `       c    V Sheet Music Left Border  K@  >>>>>>     l         cREVGeneral    revUniqueID  
1432247418659  W 
Rectangle  K@     " q        cREVGeneral    revUniqueID  
1432247596771  X Sheet Music Vertical Scrollbar   i`     4  p            cREVGeneral    revUniqueID  
1432311040807  \ 'Sheet Music Pitches Display Right Line  K      l           m cREVGeneral    revUniqueID  
1432314813704
  ] Field  )h       Fq s                        cREVGeneral    revUniqueID  
1432569042693   0 . 2 5             0 . 5           0 . 7 5               1               1 . 2 5             1 . 5           1 . 7 5               2               2 . 2 5             2 . 5           2 . 7 5               3               3 . 2 5             3 . 5           3 . 7 5               4 
'    
   lbl Players M        /       on mouseUp
   lock screen
   
   if the visible of player "Piano Player 1" is "True" then
      
      repeat with x = 0 to 88
         set the visible of player ("Piano Player" && x) to "False"
      end repeat
      
   else
      
      repeat with x = 0 to 88
         set the visible of player ("Piano Player" && x) to "True"
      end repeat
      
   end if
   
   unlock screen
end mouseUp
               cREVGeneral    revUniqueID  
1432570217324scripteditorvscroll  0scripteditorselection  385      P l a y e r s   : 
'        b Piano Player 0   !`     + #      6/Users/Cyclone/Desktop/Generator/Piano Notes/Rest.wav        cREVGeneral    revUniqueID  
1432570193437  c Piano Player 1   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/A0.wav        cREVGeneral    revUniqueID  
1432570193438  d Piano Player 2   !`     + #      8/Users/Cyclone/Desktop/Generator/Piano Notes/A#-Bb0.wav        cREVGeneral    revUniqueID  
1432570193439  e Piano Player 3   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/B0.wav        cREVGeneral    revUniqueID  
1432570193440  f Piano Player 4   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/C1.wav        cREVGeneral    revUniqueID  
1432570193441  g Piano Player 5   !`     + #      8/Users/Cyclone/Desktop/Generator/Piano Notes/C#-Db1.wav        cREVGeneral    revUniqueID  
1432570193442  h Piano Player 6   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/D1.wav        cREVGeneral    revUniqueID  
1432570193443  i Piano Player 7   !`     + #      8/Users/Cyclone/Desktop/Generator/Piano Notes/D#-Eb1.wav        cREVGeneral    revUniqueID  
1432570193444  j Piano Player 8   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/E1.wav        cREVGeneral    revUniqueID  
1432570193445  k Piano Player 9   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/F1.wav        cREVGeneral    revUniqueID  
1432570193446  l Piano Player 10   !`     + #      8/Users/Cyclone/Desktop/Generator/Piano Notes/F#-Gb1.wav        cREVGeneral    revUniqueID  
1432570193447  m Piano Player 11   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/G1.wav        cREVGeneral    revUniqueID  
1432570193448  n Piano Player 12   !`     + #      8/Users/Cyclone/Desktop/Generator/Piano Notes/G#-Ab1.wav        cREVGeneral    revUniqueID  
1432570193449  o Piano Player 13   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/A1.wav        cREVGeneral    revUniqueID  
1432570193450  p Piano Player 14   !`     + #      8/Users/Cyclone/Desktop/Generator/Piano Notes/A#-Bb1.wav        cREVGeneral    revUniqueID  
1432570193451  q Piano Player 15   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/B1.wav        cREVGeneral    revUniqueID  
1432570193452  r Piano Player 16   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/C2.wav        cREVGeneral    revUniqueID  
1432570193453  s Piano Player 17   !`     + #      8/Users/Cyclone/Desktop/Generator/Piano Notes/C#-Db2.wav        cREVGeneral    revUniqueID  
1432570193454  t Piano Player 18   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/D2.wav        cREVGeneral    revUniqueID  
1432570193455  u Piano Player 19   !`     + #      8/Users/Cyclone/Desktop/Generator/Piano Notes/D#-Eb2.wav        cREVGeneral    revUniqueID  
1432570193456  v Piano Player 20   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/E2.wav        cREVGeneral    revUniqueID  
1432570193457  w Piano Player 21   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/F2.wav        cREVGeneral    revUniqueID  
1432570193458  x Piano Player 22   !`     + #      8/Users/Cyclone/Desktop/Generator/Piano Notes/F#-Gb2.wav        cREVGeneral    revUniqueID  
1432570193459  y Piano Player 23   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/G2.wav        cREVGeneral    revUniqueID  
1432570193460  z Piano Player 24   !`     + #      8/Users/Cyclone/Desktop/Generator/Piano Notes/G#-Ab2.wav        cREVGeneral    revUniqueID  
1432570193461  { Piano Player 25   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/A2.wav        cREVGeneral    revUniqueID  
1432570193462  | Piano Player 26   !`     + #      8/Users/Cyclone/Desktop/Generator/Piano Notes/A#-Bb2.wav        cREVGeneral    revUniqueID  
1432570193463  } Piano Player 27   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/B2.wav        cREVGeneral    revUniqueID  
1432570193464  ~ Piano Player 28   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/C3.wav        cREVGeneral    revUniqueID  
1432570193465   Piano Player 29   !`     + #      8/Users/Cyclone/Desktop/Generator/Piano Notes/C#-Db3.wav        cREVGeneral    revUniqueID  
1432570193466   Piano Player 30   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/D3.wav        cREVGeneral    revUniqueID  
1432570193467   Piano Player 31   !`     + #      8/Users/Cyclone/Desktop/Generator/Piano Notes/D#-Eb3.wav        cREVGeneral    revUniqueID  
1432570193468   Piano Player 32   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/E3.wav        cREVGeneral    revUniqueID  
1432570193469   Piano Player 33   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/F3.wav        cREVGeneral    revUniqueID  
1432570193470   Piano Player 34   !`     + #      8/Users/Cyclone/Desktop/Generator/Piano Notes/F#-Gb3.wav        cREVGeneral    revUniqueID  
1432570193471   Piano Player 35   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/G3.wav        cREVGeneral    revUniqueID  
1432570193472   Piano Player 36   !`     + #      8/Users/Cyclone/Desktop/Generator/Piano Notes/G#-Ab3.wav        cREVGeneral    revUniqueID  
1432570193473   Piano Player 37   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/A3.wav        cREVGeneral    revUniqueID  
1432570193474   Piano Player 38   !`     + #      8/Users/Cyclone/Desktop/Generator/Piano Notes/A#-Bb3.wav        cREVGeneral    revUniqueID  
1432570193475   Piano Player 39   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/B3.wav        cREVGeneral    revUniqueID  
1432570193476   Piano Player 40   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/C4.wav        cREVGeneral    revUniqueID  
1432570193477   Piano Player 41   !`     + #      8/Users/Cyclone/Desktop/Generator/Piano Notes/C#-Db4.wav        cREVGeneral    revUniqueID  
1432570193478   Piano Player 42   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/D4.wav        cREVGeneral    revUniqueID  
1432570193479   Piano Player 43   !`     + #      8/Users/Cyclone/Desktop/Generator/Piano Notes/D#-Eb4.wav        cREVGeneral    revUniqueID  
1432570193480   Piano Player 44   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/E4.wav        cREVGeneral    revUniqueID  
1432570193481   Piano Player 45   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/F4.wav        cREVGeneral    revUniqueID  
1432570193482   Piano Player 46   !`     + #      8/Users/Cyclone/Desktop/Generator/Piano Notes/F#-Gb4.wav        cREVGeneral    revUniqueID  
1432570193483   Piano Player 47   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/G4.wav        cREVGeneral    revUniqueID  
1432570193484   Piano Player 48   !`     + #      8/Users/Cyclone/Desktop/Generator/Piano Notes/G#-Ab4.wav        cREVGeneral    revUniqueID  
1432570193485   Piano Player 49   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/A4.wav        cREVGeneral    revUniqueID  
1432570193486   Piano Player 50   !`     + #      8/Users/Cyclone/Desktop/Generator/Piano Notes/A#-Bb4.wav        cREVGeneral    revUniqueID  
1432570193487   Piano Player 51   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/B4.wav        cREVGeneral    revUniqueID  
1432570193488   Piano Player 52   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/C5.wav        cREVGeneral    revUniqueID  
1432570193489   Piano Player 53   !`     + #      8/Users/Cyclone/Desktop/Generator/Piano Notes/C#-Db5.wav    cREVGeneral    revUniqueID  
1432570193490   Piano Player 54   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/D5.wav        cREVGeneral    revUniqueID  
1432570193491   Piano Player 55   !`     + #      8/Users/Cyclone/Desktop/Generator/Piano Notes/D#-Eb5.wav    cREVGeneral    revUniqueID  
1432570193492   Piano Player 56   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/E5.wav        cREVGeneral    revUniqueID  
1432570193493   Piano Player 57   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/F5.wav    cREVGeneral    revUniqueID  
1432570193494   Piano Player 58   !`     + #      8/Users/Cyclone/Desktop/Generator/Piano Notes/F#-Gb5.wav        cREVGeneral    revUniqueID  
1432570193495   Piano Player 59   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/G5.wav        cREVGeneral    revUniqueID  
1432570193496   Piano Player 60   !`     + #      8/Users/Cyclone/Desktop/Generator/Piano Notes/G#-Ab5.wav        cREVGeneral    revUniqueID  
1432570193497   Piano Player 61   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/A5.wav        cREVGeneral    revUniqueID  
1432570193498   Piano Player 62   !`     + #      8/Users/Cyclone/Desktop/Generator/Piano Notes/A#-Bb5.wav        cREVGeneral    revUniqueID  
1432570193499   Piano Player 63   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/B5.wav        cREVGeneral    revUniqueID  
1432570193500   Piano Player 64   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/C6.wav        cREVGeneral    revUniqueID  
1432570193501   Piano Player 65   !`     + #      8/Users/Cyclone/Desktop/Generator/Piano Notes/C#-Db6.wav        cREVGeneral    revUniqueID  
1432570193502   Piano Player 66   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/D6.wav        cREVGeneral    revUniqueID  
1432570193503   Piano Player 67   !`     + #      8/Users/Cyclone/Desktop/Generator/Piano Notes/D#-Eb6.wav        cREVGeneral    revUniqueID  
1432570193504   Piano Player 68   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/E6.wav        cREVGeneral    revUniqueID  
1432570193505   Piano Player 69   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/F6.wav        cREVGeneral    revUniqueID  
1432570193506   Piano Player 70   !`     + #      8/Users/Cyclone/Desktop/Generator/Piano Notes/F#-Gb6.wav        cREVGeneral    revUniqueID  
1432570193507   Piano Player 71   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/G6.wav        cREVGeneral    revUniqueID  
1432570193508   Piano Player 72   !`     + #      8/Users/Cyclone/Desktop/Generator/Piano Notes/G#-Ab6.wav        cREVGeneral    revUniqueID  
1432570193509   Piano Player 73   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/A6.wav        cREVGeneral    revUniqueID  
1432570193510   Piano Player 74   !`     + #      8/Users/Cyclone/Desktop/Generator/Piano Notes/A#-Bb6.wav        cREVGeneral    revUniqueID  
1432570193511   Piano Player 75   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/B6.wav        cREVGeneral    revUniqueID  
1432570193512   Piano Player 76   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/C7.wav        cREVGeneral    revUniqueID  
1432570193513   Piano Player 77   !`     + #      8/Users/Cyclone/Desktop/Generator/Piano Notes/C#-Db7.wav        cREVGeneral    revUniqueID  
1432570193514   Piano Player 78   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/D7.wav        cREVGeneral    revUniqueID  
1432570193515   Piano Player 79   !`     + #      8/Users/Cyclone/Desktop/Generator/Piano Notes/D#-Eb7.wav        cREVGeneral    revUniqueID  
1432570193516   Piano Player 80   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/E7.wav        cREVGeneral    revUniqueID  
1432570193517   Piano Player 81   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/F7.wav        cREVGeneral    revUniqueID  
1432570193518   Piano Player 82   !`     + #      8/Users/Cyclone/Desktop/Generator/Piano Notes/F#-Gb7.wav        cREVGeneral    revUniqueID  
1432570193519   Piano Player 83   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/G7.wav        cREVGeneral    revUniqueID  
1432570193520   Piano Player 84   !`     + #      8/Users/Cyclone/Desktop/Generator/Piano Notes/G#-Ab7.wav        cREVGeneral    revUniqueID  
1432570193521   Piano Player 85   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/A7.wav        cREVGeneral    revUniqueID  
1432570193522   Piano Player 86   !`     + #      8/Users/Cyclone/Desktop/Generator/Piano Notes/A#-Bb7.wav        cREVGeneral    revUniqueID  
1432570193523   Piano Player 87   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/B7.wav        cREVGeneral    revUniqueID  
1432570193524   Piano Player 88   !`     + #      4/Users/Cyclone/Desktop/Generator/Piano Notes/C8.wav    cREVGeneral    revUniqueID  
1432570193525
   Song Tempo  9h       " #                       cREVGeneral    revUniqueID  
1432581912897    1 2 0 
'         Tempo Scrollbar  i        8        on scrollbarDrag
   lock screen
   put the thumbPos of me into field "Song Tempo"
   unlock screen
end scrollbarDrag
        Tl l 60  240        cREVGeneral    revUniqueID  
1432581912898scripteditorvscroll  0scripteditorselection  75
   Song Tempo Label 
        \                       
cREVTable    currentview  Song Tempo : cREVGeneral    revUniqueID  
1432581912899      S o n g   T e m p o   : 
'       ! Note 1  KPon mouseLeave
   lock screen
   set the lineSize of me to "1"
   unlock screen
end mouseLeave


local n.rightAdjust
local n.leftAdjust
local w.State


on mouseDown
   send noteClicked && (the name of me) to this card
   put 0 into n.rightAdjust
   put 0 into n.leftAdjust
   put "" into w.State
end mouseDown


on mouseMove
   lock screen
   set the lineSize of me to "2"
   put 5 into n.Edge
   if mouse(1) is "Down" and the hilitedLine of field "Note Database" is not "" then 
      put the hilitedLine of field "Note Database" into n.lineNum
      switch
         -- Middle
         default
            put "Middle" into w.State
            switch
               case item 2 of the mouseLoc < the top of me -- Up
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me - the height of grc "Note Copy"
                  --put checkNoteIntersect(the name of me) into b.Intersect
                  --if b.Intersect is "False" then
                  subtract 1 from item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  --else
                  --set the loc of me to item 1 of the loc of me, item 2 of the loc of me + the height of grc "Note Copy"
                  --end if
                  break 
               case item 2 of the mouseLoc > the bottom of me -- Down
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me + the height of grc "Note Copy"
                  add 1 to item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  break 
               case item 1 of the mouseLoc > the right of me - (the width of grc "Note Copy" / 4)  -- Right
                  set the loc of me to item 1 of the loc of me + the width of grc "Note Copy" / 4, item 2 of the loc of me
                  add 0.25 to item 4 of line n.lineNum of field "Note Database"
                  add 0.25 to item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
               case item 1 of the mouseLoc < the left of me + (the width of grc "Note Copy" / 4) -- Left
                  set the loc of me to item 1 of the loc of me - the width of grc "Note Copy" / 4, item 2 of the loc of me
                  subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                  subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
            end switch
            break
            -- Right
         case item 1 of the clickLoc + (n.rightAdjust * (the width of grc "Note Copy" / 4)) >= the right of me - n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc > the left of me + n.Edge then
               switch
                  case item 1 of the mouseLoc >= the right of me + n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                     add 0.25 to item 5 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.rightAdjust
                     break 
                  case item 1 of the mouseLoc <= the right of me - n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                        subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.rightAdjust
                     end if
                     break 
               end switch
            end if
            break
            -- Left
         case item 1 of the clickLoc - (n.leftAdjust * (the width of grc "Note Copy" / 4)) <= the left of me + n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc < the right of me + n.Edge then
               switch
                  case item 1 of the mouseLoc <= the left of me - n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                     subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.leftAdjust
                     break 
                  case item 1 of the mouseLoc >= the left of me + n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                        add 0.25 to item 4 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.leftAdjust
                     end if
                     break 
               end switch
            end if
            break
      end switch
   end if
   unlock screen
end mouseMove

/*
function checkNoteIntersect s.Name
   
   put char 2 to -2 of s.Name into theName
   put word 1 of theName into w.Type
   put word 2 of theName into n.Num
   
   put field "Note Database" into f.Note_Database
   
end checkNoteIntersect
*/
  : yy#"  XXUU       z8          cREVGeneral    revUniqueID  
1432583018481scripteditorvscroll  459scripteditorselection  1363  " Note 2  KPon mouseLeave
   lock screen
   set the lineSize of me to "1"
   unlock screen
end mouseLeave


local n.rightAdjust
local n.leftAdjust
local w.State


on mouseDown
   send noteClicked && (the name of me) to this card
   put 0 into n.rightAdjust
   put 0 into n.leftAdjust
   put "" into w.State
end mouseDown


on mouseMove
   lock screen
   set the lineSize of me to "2"
   put 5 into n.Edge
   if mouse(1) is "Down" and the hilitedLine of field "Note Database" is not "" then 
      put the hilitedLine of field "Note Database" into n.lineNum
      switch
         -- Middle
         default
            put "Middle" into w.State
            switch
               case item 2 of the mouseLoc < the top of me -- Up
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me - the height of grc "Note Copy"
                  subtract 1 from item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  break 
               case item 2 of the mouseLoc > the bottom of me -- Down
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me + the height of grc "Note Copy"
                  add 1 to item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  break 
               case item 1 of the mouseLoc > the right of me - (the width of grc "Note Copy" / 4)  -- Right
                  set the loc of me to item 1 of the loc of me + the width of grc "Note Copy" / 4, item 2 of the loc of me
                  add 0.25 to item 4 of line n.lineNum of field "Note Database"
                  add 0.25 to item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
               case item 1 of the mouseLoc < the left of me + (the width of grc "Note Copy" / 4) -- Left
                  set the loc of me to item 1 of the loc of me - the width of grc "Note Copy" / 4, item 2 of the loc of me
                  subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                  subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
            end switch
            break
            -- Right
         case item 1 of the clickLoc + (n.rightAdjust * (the width of grc "Note Copy" / 4)) >= the right of me - n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc > the left of me + n.Edge then
               switch
                  case item 1 of the mouseLoc >= the right of me + n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                     add 0.25 to item 5 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.rightAdjust
                     break 
                  case item 1 of the mouseLoc <= the right of me - n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                        subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.rightAdjust
                     end if
                     break 
               end switch
            end if
            break
            -- Left
         case item 1 of the clickLoc - (n.leftAdjust * (the width of grc "Note Copy" / 4)) <= the left of me + n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc < the right of me + n.Edge then
               switch
                  case item 1 of the mouseLoc <= the left of me - n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                     subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.leftAdjust
                     break 
                  case item 1 of the mouseLoc >= the left of me + n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                        add 0.25 to item 4 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.leftAdjust
                     end if
                     break 
               end switch
            end if
            break
      end switch
   end if
   unlock screen
end mouseMove
  : yy#"  XXUU                  cREVGeneral    revUniqueID  
1432585298024scripteditorvscroll  0scripteditorselection  5869  # Note 3  KPon mouseLeave
   lock screen
   set the lineSize of me to "1"
   unlock screen
end mouseLeave


local n.rightAdjust
local n.leftAdjust
local w.State


on mouseDown
   send noteClicked && (the name of me) to this card
   put 0 into n.rightAdjust
   put 0 into n.leftAdjust
   put "" into w.State
end mouseDown


on mouseMove
   lock screen
   set the lineSize of me to "2"
   put 5 into n.Edge
   if mouse(1) is "Down" and the hilitedLine of field "Note Database" is not "" then 
      put the hilitedLine of field "Note Database" into n.lineNum
      switch
         -- Middle
         default
            put "Middle" into w.State
            switch
               case item 2 of the mouseLoc < the top of me -- Up
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me - the height of grc "Note Copy"
                  subtract 1 from item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  break 
               case item 2 of the mouseLoc > the bottom of me -- Down
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me + the height of grc "Note Copy"
                  add 1 to item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  break 
               case item 1 of the mouseLoc > the right of me - (the width of grc "Note Copy" / 4)  -- Right
                  set the loc of me to item 1 of the loc of me + the width of grc "Note Copy" / 4, item 2 of the loc of me
                  add 0.25 to item 4 of line n.lineNum of field "Note Database"
                  add 0.25 to item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
               case item 1 of the mouseLoc < the left of me + (the width of grc "Note Copy" / 4) -- Left
                  set the loc of me to item 1 of the loc of me - the width of grc "Note Copy" / 4, item 2 of the loc of me
                  subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                  subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
            end switch
            break
            -- Right
         case item 1 of the clickLoc + (n.rightAdjust * (the width of grc "Note Copy" / 4)) >= the right of me - n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc > the left of me + n.Edge then
               switch
                  case item 1 of the mouseLoc >= the right of me + n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                     add 0.25 to item 5 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.rightAdjust
                     break 
                  case item 1 of the mouseLoc <= the right of me - n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                        subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.rightAdjust
                     end if
                     break 
               end switch
            end if
            break
            -- Left
         case item 1 of the clickLoc - (n.leftAdjust * (the width of grc "Note Copy" / 4)) <= the left of me + n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc < the right of me + n.Edge then
               switch
                  case item 1 of the mouseLoc <= the left of me - n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                     subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.leftAdjust
                     break 
                  case item 1 of the mouseLoc >= the left of me + n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                        add 0.25 to item 4 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.leftAdjust
                     end if
                     break 
               end switch
            end if
            break
      end switch
   end if
   unlock screen
end mouseMove
  : yy#"  XXUU         (         cREVGeneral    revUniqueID  
1432585298025scripteditorvscroll  360scripteditorselection  1584  $ Note 4  KPon mouseLeave
   lock screen
   set the lineSize of me to "1"
   unlock screen
end mouseLeave


local n.rightAdjust
local n.leftAdjust
local w.State


on mouseDown
   send noteClicked && (the name of me) to this card
   put 0 into n.rightAdjust
   put 0 into n.leftAdjust
   put "" into w.State
end mouseDown


on mouseMove
   lock screen
   set the lineSize of me to "2"
   put 5 into n.Edge
   if mouse(1) is "Down" and the hilitedLine of field "Note Database" is not "" then 
      put the hilitedLine of field "Note Database" into n.lineNum
      switch
         -- Middle
         default
            put "Middle" into w.State
            switch
               case item 2 of the mouseLoc < the top of me -- Up
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me - the height of grc "Note Copy"
                  subtract 1 from item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  break 
               case item 2 of the mouseLoc > the bottom of me -- Down
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me + the height of grc "Note Copy"
                  add 1 to item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  break 
               case item 1 of the mouseLoc > the right of me - (the width of grc "Note Copy" / 4)  -- Right
                  set the loc of me to item 1 of the loc of me + the width of grc "Note Copy" / 4, item 2 of the loc of me
                  add 0.25 to item 4 of line n.lineNum of field "Note Database"
                  add 0.25 to item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
               case item 1 of the mouseLoc < the left of me + (the width of grc "Note Copy" / 4) -- Left
                  set the loc of me to item 1 of the loc of me - the width of grc "Note Copy" / 4, item 2 of the loc of me
                  subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                  subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
            end switch
            break
            -- Right
         case item 1 of the clickLoc + (n.rightAdjust * (the width of grc "Note Copy" / 4)) >= the right of me - n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc > the left of me + n.Edge then
               switch
                  case item 1 of the mouseLoc >= the right of me + n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                     add 0.25 to item 5 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.rightAdjust
                     break 
                  case item 1 of the mouseLoc <= the right of me - n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                        subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.rightAdjust
                     end if
                     break 
               end switch
            end if
            break
            -- Left
         case item 1 of the clickLoc - (n.leftAdjust * (the width of grc "Note Copy" / 4)) <= the left of me + n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc < the right of me + n.Edge then
               switch
                  case item 1 of the mouseLoc <= the left of me - n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                     subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.leftAdjust
                     break 
                  case item 1 of the mouseLoc >= the left of me + n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                        add 0.25 to item 4 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.leftAdjust
                     end if
                     break 
               end switch
            end if
            break
      end switch
   end if
   unlock screen
end mouseMove
  : yy#"  XXUU        
         cREVGeneral    revUniqueID  
1432585298026scripteditorvscroll  1345scripteditorselection  4426  + Note 5  KPon mouseLeave
   lock screen
   set the lineSize of me to "1"
   unlock screen
end mouseLeave


local n.rightAdjust
local n.leftAdjust
local w.State


on mouseDown
   send noteClicked && (the name of me) to this card
   put 0 into n.rightAdjust
   put 0 into n.leftAdjust
   put "" into w.State
end mouseDown


on mouseMove
   lock screen
   set the lineSize of me to "2"
   put 5 into n.Edge
   if mouse(1) is "Down" and the hilitedLine of field "Note Database" is not "" then 
      put the hilitedLine of field "Note Database" into n.lineNum
      switch
         -- Middle
         default
            put "Middle" into w.State
            switch
               case item 2 of the mouseLoc < the top of me -- Up
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me - the height of grc "Note Copy"
                  subtract 1 from item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  break 
               case item 2 of the mouseLoc > the bottom of me -- Down
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me + the height of grc "Note Copy"
                  add 1 to item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  break 
               case item 1 of the mouseLoc > the right of me - (the width of grc "Note Copy" / 4)  -- Right
                  set the loc of me to item 1 of the loc of me + the width of grc "Note Copy" / 4, item 2 of the loc of me
                  add 0.25 to item 4 of line n.lineNum of field "Note Database"
                  add 0.25 to item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
               case item 1 of the mouseLoc < the left of me + (the width of grc "Note Copy" / 4) -- Left
                  set the loc of me to item 1 of the loc of me - the width of grc "Note Copy" / 4, item 2 of the loc of me
                  subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                  subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
            end switch
            break
            -- Right
         case item 1 of the clickLoc + (n.rightAdjust * (the width of grc "Note Copy" / 4)) >= the right of me - n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc > the left of me + n.Edge then
               switch
                  case item 1 of the mouseLoc >= the right of me + n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                     add 0.25 to item 5 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.rightAdjust
                     break 
                  case item 1 of the mouseLoc <= the right of me - n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                        subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.rightAdjust
                     end if
                     break 
               end switch
            end if
            break
            -- Left
         case item 1 of the clickLoc - (n.leftAdjust * (the width of grc "Note Copy" / 4)) <= the left of me + n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc < the right of me + n.Edge then
               switch
                  case item 1 of the mouseLoc <= the left of me - n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                     subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.leftAdjust
                     break 
                  case item 1 of the mouseLoc >= the left of me + n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                        add 0.25 to item 4 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.leftAdjust
                     end if
                     break 
               end switch
            end if
            break
      end switch
   end if
   unlock screen
end mouseMove
  : yy#"  XXUU       8 <         cREVGeneral    revUniqueID  
1432585298027scripteditorvscroll  954scripteditorselection  5869  , Note 6  KPon mouseLeave
   lock screen
   set the lineSize of me to "1"
   unlock screen
end mouseLeave


local n.rightAdjust
local n.leftAdjust
local w.State


on mouseDown
   send noteClicked && (the name of me) to this card
   put 0 into n.rightAdjust
   put 0 into n.leftAdjust
   put "" into w.State
end mouseDown


on mouseMove
   lock screen
   set the lineSize of me to "2"
   put 5 into n.Edge
   if mouse(1) is "Down" and the hilitedLine of field "Note Database" is not "" then 
      put the hilitedLine of field "Note Database" into n.lineNum
      switch
         -- Middle
         default
            put "Middle" into w.State
            switch
               case item 2 of the mouseLoc < the top of me -- Up
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me - the height of grc "Note Copy"
                  subtract 1 from item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  break 
               case item 2 of the mouseLoc > the bottom of me -- Down
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me + the height of grc "Note Copy"
                  add 1 to item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  break 
               case item 1 of the mouseLoc > the right of me - (the width of grc "Note Copy" / 4)  -- Right
                  set the loc of me to item 1 of the loc of me + the width of grc "Note Copy" / 4, item 2 of the loc of me
                  add 0.25 to item 4 of line n.lineNum of field "Note Database"
                  add 0.25 to item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
               case item 1 of the mouseLoc < the left of me + (the width of grc "Note Copy" / 4) -- Left
                  set the loc of me to item 1 of the loc of me - the width of grc "Note Copy" / 4, item 2 of the loc of me
                  subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                  subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
            end switch
            break
            -- Right
         case item 1 of the clickLoc + (n.rightAdjust * (the width of grc "Note Copy" / 4)) >= the right of me - n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc > the left of me + n.Edge then
               switch
                  case item 1 of the mouseLoc >= the right of me + n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                     add 0.25 to item 5 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.rightAdjust
                     break 
                  case item 1 of the mouseLoc <= the right of me - n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                        subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.rightAdjust
                     end if
                     break 
               end switch
            end if
            break
            -- Left
         case item 1 of the clickLoc - (n.leftAdjust * (the width of grc "Note Copy" / 4)) <= the left of me + n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc < the right of me + n.Edge then
               switch
                  case item 1 of the mouseLoc <= the left of me - n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                     subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.leftAdjust
                     break 
                  case item 1 of the mouseLoc >= the left of me + n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                        add 0.25 to item 4 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.leftAdjust
                     end if
                     break 
               end switch
            end if
            break
      end switch
   end if
   unlock screen
end mouseMove
  : yy#"  XXUU       8          cREVGeneral    revUniqueID  
1432606945690scripteditorvscroll  1350scripteditorselection  5869  - Note 7  KPon mouseLeave
   lock screen
   set the lineSize of me to "1"
   unlock screen
end mouseLeave


local n.rightAdjust
local n.leftAdjust
local w.State


on mouseDown
   send noteClicked && (the name of me) to this card
   put 0 into n.rightAdjust
   put 0 into n.leftAdjust
   put "" into w.State
end mouseDown


on mouseMove
   lock screen
   set the lineSize of me to "2"
   put 5 into n.Edge
   if mouse(1) is "Down" and the hilitedLine of field "Note Database" is not "" then 
      put the hilitedLine of field "Note Database" into n.lineNum
      switch
         -- Middle
         default
            put "Middle" into w.State
            switch
               case item 2 of the mouseLoc < the top of me -- Up
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me - the height of grc "Note Copy"
                  subtract 1 from item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  break 
               case item 2 of the mouseLoc > the bottom of me -- Down
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me + the height of grc "Note Copy"
                  add 1 to item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  break 
               case item 1 of the mouseLoc > the right of me - (the width of grc "Note Copy" / 4)  -- Right
                  set the loc of me to item 1 of the loc of me + the width of grc "Note Copy" / 4, item 2 of the loc of me
                  add 0.25 to item 4 of line n.lineNum of field "Note Database"
                  add 0.25 to item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
               case item 1 of the mouseLoc < the left of me + (the width of grc "Note Copy" / 4) -- Left
                  set the loc of me to item 1 of the loc of me - the width of grc "Note Copy" / 4, item 2 of the loc of me
                  subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                  subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
            end switch
            break
            -- Right
         case item 1 of the clickLoc + (n.rightAdjust * (the width of grc "Note Copy" / 4)) >= the right of me - n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc > the left of me + n.Edge then
               switch
                  case item 1 of the mouseLoc >= the right of me + n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                     add 0.25 to item 5 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.rightAdjust
                     break 
                  case item 1 of the mouseLoc <= the right of me - n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                        subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.rightAdjust
                     end if
                     break 
               end switch
            end if
            break
            -- Left
         case item 1 of the clickLoc - (n.leftAdjust * (the width of grc "Note Copy" / 4)) <= the left of me + n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc < the right of me + n.Edge then
               switch
                  case item 1 of the mouseLoc <= the left of me - n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                     subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.leftAdjust
                     break 
                  case item 1 of the mouseLoc >= the left of me + n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                        add 0.25 to item 4 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.leftAdjust
                     end if
                     break 
               end switch
            end if
            break
      end switch
   end if
   unlock screen
end mouseMove
  : yy#"  XXUU       .           cREVGeneral    revUniqueID  
1432606945691scripteditorvscroll  1350scripteditorselection  5869  . Note 8  KPon mouseLeave
   lock screen
   set the lineSize of me to "1"
   unlock screen
end mouseLeave


local n.rightAdjust
local n.leftAdjust
local w.State


on mouseDown
   send noteClicked && (the name of me) to this card
   put 0 into n.rightAdjust
   put 0 into n.leftAdjust
   put "" into w.State
end mouseDown


on mouseMove
   lock screen
   set the lineSize of me to "2"
   put 5 into n.Edge
   if mouse(1) is "Down" and the hilitedLine of field "Note Database" is not "" then 
      put the hilitedLine of field "Note Database" into n.lineNum
      switch
         -- Middle
         default
            put "Middle" into w.State
            switch
               case item 2 of the mouseLoc < the top of me -- Up
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me - the height of grc "Note Copy"
                  subtract 1 from item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  break 
               case item 2 of the mouseLoc > the bottom of me -- Down
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me + the height of grc "Note Copy"
                  add 1 to item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  break 
               case item 1 of the mouseLoc > the right of me - (the width of grc "Note Copy" / 4)  -- Right
                  set the loc of me to item 1 of the loc of me + the width of grc "Note Copy" / 4, item 2 of the loc of me
                  add 0.25 to item 4 of line n.lineNum of field "Note Database"
                  add 0.25 to item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
               case item 1 of the mouseLoc < the left of me + (the width of grc "Note Copy" / 4) -- Left
                  set the loc of me to item 1 of the loc of me - the width of grc "Note Copy" / 4, item 2 of the loc of me
                  subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                  subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
            end switch
            break
            -- Right
         case item 1 of the clickLoc + (n.rightAdjust * (the width of grc "Note Copy" / 4)) >= the right of me - n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc > the left of me + n.Edge then
               switch
                  case item 1 of the mouseLoc >= the right of me + n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                     add 0.25 to item 5 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.rightAdjust
                     break 
                  case item 1 of the mouseLoc <= the right of me - n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                        subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.rightAdjust
                     end if
                     break 
               end switch
            end if
            break
            -- Left
         case item 1 of the clickLoc - (n.leftAdjust * (the width of grc "Note Copy" / 4)) <= the left of me + n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc < the right of me + n.Edge then
               switch
                  case item 1 of the mouseLoc <= the left of me - n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                     subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.leftAdjust
                     break 
                  case item 1 of the mouseLoc >= the left of me + n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                        add 0.25 to item 4 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.leftAdjust
                     end if
                     break 
               end switch
            end if
            break
      end switch
   end if
   unlock screen
end mouseMove
  : yy#"  XXUU       L 
         cREVGeneral    revUniqueID  
1432606945692scripteditorvscroll  1350scripteditorselection  5869  / Note 9  KPon mouseLeave
   lock screen
   set the lineSize of me to "1"
   unlock screen
end mouseLeave


local n.rightAdjust
local n.leftAdjust
local w.State


on mouseDown
   send noteClicked && (the name of me) to this card
   put 0 into n.rightAdjust
   put 0 into n.leftAdjust
   put "" into w.State
end mouseDown


on mouseMove
   lock screen
   set the lineSize of me to "2"
   put 5 into n.Edge
   if mouse(1) is "Down" and the hilitedLine of field "Note Database" is not "" then 
      put the hilitedLine of field "Note Database" into n.lineNum
      switch
         -- Middle
         default
            put "Middle" into w.State
            switch
               case item 2 of the mouseLoc < the top of me -- Up
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me - the height of grc "Note Copy"
                  subtract 1 from item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  break 
               case item 2 of the mouseLoc > the bottom of me -- Down
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me + the height of grc "Note Copy"
                  add 1 to item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  break 
               case item 1 of the mouseLoc > the right of me - (the width of grc "Note Copy" / 4)  -- Right
                  set the loc of me to item 1 of the loc of me + the width of grc "Note Copy" / 4, item 2 of the loc of me
                  add 0.25 to item 4 of line n.lineNum of field "Note Database"
                  add 0.25 to item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
               case item 1 of the mouseLoc < the left of me + (the width of grc "Note Copy" / 4) -- Left
                  set the loc of me to item 1 of the loc of me - the width of grc "Note Copy" / 4, item 2 of the loc of me
                  subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                  subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
            end switch
            break
            -- Right
         case item 1 of the clickLoc + (n.rightAdjust * (the width of grc "Note Copy" / 4)) >= the right of me - n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc > the left of me + n.Edge then
               switch
                  case item 1 of the mouseLoc >= the right of me + n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                     add 0.25 to item 5 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.rightAdjust
                     break 
                  case item 1 of the mouseLoc <= the right of me - n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                        subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.rightAdjust
                     end if
                     break 
               end switch
            end if
            break
            -- Left
         case item 1 of the clickLoc - (n.leftAdjust * (the width of grc "Note Copy" / 4)) <= the left of me + n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc < the right of me + n.Edge then
               switch
                  case item 1 of the mouseLoc <= the left of me - n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                     subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.leftAdjust
                     break 
                  case item 1 of the mouseLoc >= the left of me + n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                        add 0.25 to item 4 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.leftAdjust
                     end if
                     break 
               end switch
            end if
            break
      end switch
   end if
   unlock screen
end mouseMove
  : yy#"  XXUU       V  d         cREVGeneral    revUniqueID  
1432606945693scripteditorvscroll  1350scripteditorselection  5869  7 Note 10  KPon mouseLeave
   lock screen
   set the lineSize of me to "1"
   unlock screen
end mouseLeave


local n.rightAdjust
local n.leftAdjust
local w.State


on mouseDown
   send noteClicked && (the name of me) to this card
   put 0 into n.rightAdjust
   put 0 into n.leftAdjust
   put "" into w.State
end mouseDown


on mouseMove
   lock screen
   set the lineSize of me to "2"
   put 5 into n.Edge
   if mouse(1) is "Down" and the hilitedLine of field "Note Database" is not "" then 
      put the hilitedLine of field "Note Database" into n.lineNum
      switch
         -- Middle
         default
            put "Middle" into w.State
            switch
               case item 2 of the mouseLoc < the top of me -- Up
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me - the height of grc "Note Copy"
                  subtract 1 from item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  break 
               case item 2 of the mouseLoc > the bottom of me -- Down
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me + the height of grc "Note Copy"
                  add 1 to item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  break 
               case item 1 of the mouseLoc > the right of me - (the width of grc "Note Copy" / 4)  -- Right
                  set the loc of me to item 1 of the loc of me + the width of grc "Note Copy" / 4, item 2 of the loc of me
                  add 0.25 to item 4 of line n.lineNum of field "Note Database"
                  add 0.25 to item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
               case item 1 of the mouseLoc < the left of me + (the width of grc "Note Copy" / 4) -- Left
                  set the loc of me to item 1 of the loc of me - the width of grc "Note Copy" / 4, item 2 of the loc of me
                  subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                  subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
            end switch
            break
            -- Right
         case item 1 of the clickLoc + (n.rightAdjust * (the width of grc "Note Copy" / 4)) >= the right of me - n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc > the left of me + n.Edge then
               switch
                  case item 1 of the mouseLoc >= the right of me + n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                     add 0.25 to item 5 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.rightAdjust
                     break 
                  case item 1 of the mouseLoc <= the right of me - n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                        subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.rightAdjust
                     end if
                     break 
               end switch
            end if
            break
            -- Left
         case item 1 of the clickLoc - (n.leftAdjust * (the width of grc "Note Copy" / 4)) <= the left of me + n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc < the right of me + n.Edge then
               switch
                  case item 1 of the mouseLoc <= the left of me - n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                     subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.leftAdjust
                     break 
                  case item 1 of the mouseLoc >= the left of me + n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                        add 0.25 to item 4 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.leftAdjust
                     end if
                     break 
               end switch
            end if
            break
      end switch
   end if
   unlock screen
end mouseMove
  : yy#"  XXUU       8          cREVGeneral    revUniqueID  
1432606945694scripteditorvscroll  1350scripteditorselection  5869  8 Note 11  KPon mouseLeave
   lock screen
   set the lineSize of me to "1"
   unlock screen
end mouseLeave


local n.rightAdjust
local n.leftAdjust
local w.State


on mouseDown
   send noteClicked && (the name of me) to this card
   put 0 into n.rightAdjust
   put 0 into n.leftAdjust
   put "" into w.State
end mouseDown


on mouseMove
   lock screen
   set the lineSize of me to "2"
   put 5 into n.Edge
   if mouse(1) is "Down" and the hilitedLine of field "Note Database" is not "" then 
      put the hilitedLine of field "Note Database" into n.lineNum
      switch
         -- Middle
         default
            put "Middle" into w.State
            switch
               case item 2 of the mouseLoc < the top of me -- Up
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me - the height of grc "Note Copy"
                  subtract 1 from item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  break 
               case item 2 of the mouseLoc > the bottom of me -- Down
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me + the height of grc "Note Copy"
                  add 1 to item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  break 
               case item 1 of the mouseLoc > the right of me - (the width of grc "Note Copy" / 4)  -- Right
                  set the loc of me to item 1 of the loc of me + the width of grc "Note Copy" / 4, item 2 of the loc of me
                  add 0.25 to item 4 of line n.lineNum of field "Note Database"
                  add 0.25 to item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
               case item 1 of the mouseLoc < the left of me + (the width of grc "Note Copy" / 4) -- Left
                  set the loc of me to item 1 of the loc of me - the width of grc "Note Copy" / 4, item 2 of the loc of me
                  subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                  subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
            end switch
            break
            -- Right
         case item 1 of the clickLoc + (n.rightAdjust * (the width of grc "Note Copy" / 4)) >= the right of me - n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc > the left of me + n.Edge then
               switch
                  case item 1 of the mouseLoc >= the right of me + n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                     add 0.25 to item 5 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.rightAdjust
                     break 
                  case item 1 of the mouseLoc <= the right of me - n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                        subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.rightAdjust
                     end if
                     break 
               end switch
            end if
            break
            -- Left
         case item 1 of the clickLoc - (n.leftAdjust * (the width of grc "Note Copy" / 4)) <= the left of me + n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc < the right of me + n.Edge then
               switch
                  case item 1 of the mouseLoc <= the left of me - n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                     subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.leftAdjust
                     break 
                  case item 1 of the mouseLoc >= the left of me + n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                        add 0.25 to item 4 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.leftAdjust
                     end if
                     break 
               end switch
            end if
            break
      end switch
   end if
   unlock screen
end mouseMove
  : yy#"  XXUU                  cREVGeneral    revUniqueID  
1432606945695scripteditorvscroll  1350scripteditorselection  5869  9 Note 12  KPon mouseLeave
   lock screen
   set the lineSize of me to "1"
   unlock screen
end mouseLeave


local n.rightAdjust
local n.leftAdjust
local w.State


on mouseDown
   send noteClicked && (the name of me) to this card
   put 0 into n.rightAdjust
   put 0 into n.leftAdjust
   put "" into w.State
end mouseDown


on mouseMove
   lock screen
   set the lineSize of me to "2"
   put 5 into n.Edge
   if mouse(1) is "Down" and the hilitedLine of field "Note Database" is not "" then 
      put the hilitedLine of field "Note Database" into n.lineNum
      switch
         -- Middle
         default
            put "Middle" into w.State
            switch
               case item 2 of the mouseLoc < the top of me -- Up
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me - the height of grc "Note Copy"
                  subtract 1 from item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  break 
               case item 2 of the mouseLoc > the bottom of me -- Down
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me + the height of grc "Note Copy"
                  add 1 to item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  break 
               case item 1 of the mouseLoc > the right of me - (the width of grc "Note Copy" / 4)  -- Right
                  set the loc of me to item 1 of the loc of me + the width of grc "Note Copy" / 4, item 2 of the loc of me
                  add 0.25 to item 4 of line n.lineNum of field "Note Database"
                  add 0.25 to item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
               case item 1 of the mouseLoc < the left of me + (the width of grc "Note Copy" / 4) -- Left
                  set the loc of me to item 1 of the loc of me - the width of grc "Note Copy" / 4, item 2 of the loc of me
                  subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                  subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
            end switch
            break
            -- Right
         case item 1 of the clickLoc + (n.rightAdjust * (the width of grc "Note Copy" / 4)) >= the right of me - n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc > the left of me + n.Edge then
               switch
                  case item 1 of the mouseLoc >= the right of me + n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                     add 0.25 to item 5 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.rightAdjust
                     break 
                  case item 1 of the mouseLoc <= the right of me - n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                        subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.rightAdjust
                     end if
                     break 
               end switch
            end if
            break
            -- Left
         case item 1 of the clickLoc - (n.leftAdjust * (the width of grc "Note Copy" / 4)) <= the left of me + n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc < the right of me + n.Edge then
               switch
                  case item 1 of the mouseLoc <= the left of me - n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                     subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.leftAdjust
                     break 
                  case item 1 of the mouseLoc >= the left of me + n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                        add 0.25 to item 4 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.leftAdjust
                     end if
                     break 
               end switch
            end if
            break
      end switch
   end if
   unlock screen
end mouseMove
  : yy#"  XXUU        
         cREVGeneral    revUniqueID  
1432606945696scripteditorvscroll  1350scripteditorselection  5869  : Note 13  KPon mouseLeave
   lock screen
   set the lineSize of me to "1"
   unlock screen
end mouseLeave


local n.rightAdjust
local n.leftAdjust
local w.State


on mouseDown
   send noteClicked && (the name of me) to this card
   put 0 into n.rightAdjust
   put 0 into n.leftAdjust
   put "" into w.State
end mouseDown


on mouseMove
   lock screen
   set the lineSize of me to "2"
   put 5 into n.Edge
   if mouse(1) is "Down" and the hilitedLine of field "Note Database" is not "" then 
      put the hilitedLine of field "Note Database" into n.lineNum
      switch
         -- Middle
         default
            put "Middle" into w.State
            switch
               case item 2 of the mouseLoc < the top of me -- Up
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me - the height of grc "Note Copy"
                  subtract 1 from item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  break 
               case item 2 of the mouseLoc > the bottom of me -- Down
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me + the height of grc "Note Copy"
                  add 1 to item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  break 
               case item 1 of the mouseLoc > the right of me - (the width of grc "Note Copy" / 4)  -- Right
                  set the loc of me to item 1 of the loc of me + the width of grc "Note Copy" / 4, item 2 of the loc of me
                  add 0.25 to item 4 of line n.lineNum of field "Note Database"
                  add 0.25 to item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
               case item 1 of the mouseLoc < the left of me + (the width of grc "Note Copy" / 4) -- Left
                  set the loc of me to item 1 of the loc of me - the width of grc "Note Copy" / 4, item 2 of the loc of me
                  subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                  subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
            end switch
            break
            -- Right
         case item 1 of the clickLoc + (n.rightAdjust * (the width of grc "Note Copy" / 4)) >= the right of me - n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc > the left of me + n.Edge then
               switch
                  case item 1 of the mouseLoc >= the right of me + n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                     add 0.25 to item 5 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.rightAdjust
                     break 
                  case item 1 of the mouseLoc <= the right of me - n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                        subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.rightAdjust
                     end if
                     break 
               end switch
            end if
            break
            -- Left
         case item 1 of the clickLoc - (n.leftAdjust * (the width of grc "Note Copy" / 4)) <= the left of me + n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc < the right of me + n.Edge then
               switch
                  case item 1 of the mouseLoc <= the left of me - n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                     subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.leftAdjust
                     break 
                  case item 1 of the mouseLoc >= the left of me + n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                        add 0.25 to item 4 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.leftAdjust
                     end if
                     break 
               end switch
            end if
            break
      end switch
   end if
   unlock screen
end mouseMove
  : yy#"  XXUU         (         cREVGeneral    revUniqueID  
1432606945697scripteditorvscroll  1350scripteditorselection  5869  ; Note 14  KPon mouseLeave
   lock screen
   set the lineSize of me to "1"
   unlock screen
end mouseLeave


local n.rightAdjust
local n.leftAdjust
local w.State


on mouseDown
   send noteClicked && (the name of me) to this card
   put 0 into n.rightAdjust
   put 0 into n.leftAdjust
   put "" into w.State
end mouseDown


on mouseMove
   lock screen
   set the lineSize of me to "2"
   put 5 into n.Edge
   if mouse(1) is "Down" and the hilitedLine of field "Note Database" is not "" then 
      put the hilitedLine of field "Note Database" into n.lineNum
      switch
         -- Middle
         default
            put "Middle" into w.State
            switch
               case item 2 of the mouseLoc < the top of me -- Up
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me - the height of grc "Note Copy"
                  subtract 1 from item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  break 
               case item 2 of the mouseLoc > the bottom of me -- Down
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me + the height of grc "Note Copy"
                  add 1 to item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  break 
               case item 1 of the mouseLoc > the right of me - (the width of grc "Note Copy" / 4)  -- Right
                  set the loc of me to item 1 of the loc of me + the width of grc "Note Copy" / 4, item 2 of the loc of me
                  add 0.25 to item 4 of line n.lineNum of field "Note Database"
                  add 0.25 to item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
               case item 1 of the mouseLoc < the left of me + (the width of grc "Note Copy" / 4) -- Left
                  set the loc of me to item 1 of the loc of me - the width of grc "Note Copy" / 4, item 2 of the loc of me
                  subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                  subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
            end switch
            break
            -- Right
         case item 1 of the clickLoc + (n.rightAdjust * (the width of grc "Note Copy" / 4)) >= the right of me - n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc > the left of me + n.Edge then
               switch
                  case item 1 of the mouseLoc >= the right of me + n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                     add 0.25 to item 5 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.rightAdjust
                     break 
                  case item 1 of the mouseLoc <= the right of me - n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                        subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.rightAdjust
                     end if
                     break 
               end switch
            end if
            break
            -- Left
         case item 1 of the clickLoc - (n.leftAdjust * (the width of grc "Note Copy" / 4)) <= the left of me + n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc < the right of me + n.Edge then
               switch
                  case item 1 of the mouseLoc <= the left of me - n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                     subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.leftAdjust
                     break 
                  case item 1 of the mouseLoc >= the left of me + n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                        add 0.25 to item 4 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.leftAdjust
                     end if
                     break 
               end switch
            end if
            break
      end switch
   end if
   unlock screen
end mouseMove
  : yy#"  XXUU       8 <         cREVGeneral    revUniqueID  
1432606945698scripteditorvscroll  690scripteditorselection  5869  < Note 15  KPon mouseLeave
   lock screen
   set the lineSize of me to "1"
   unlock screen
end mouseLeave


local n.rightAdjust
local n.leftAdjust
local w.State


on mouseDown
   send noteClicked && (the name of me) to this card
   put 0 into n.rightAdjust
   put 0 into n.leftAdjust
   put "" into w.State
end mouseDown


on mouseMove
   lock screen
   set the lineSize of me to "2"
   put 5 into n.Edge
   if mouse(1) is "Down" and the hilitedLine of field "Note Database" is not "" then 
      put the hilitedLine of field "Note Database" into n.lineNum
      switch
         -- Middle
         default
            put "Middle" into w.State
            switch
               case item 2 of the mouseLoc < the top of me -- Up
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me - the height of grc "Note Copy"
                  subtract 1 from item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  break 
               case item 2 of the mouseLoc > the bottom of me -- Down
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me + the height of grc "Note Copy"
                  add 1 to item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  break 
               case item 1 of the mouseLoc > the right of me - (the width of grc "Note Copy" / 4)  -- Right
                  set the loc of me to item 1 of the loc of me + the width of grc "Note Copy" / 4, item 2 of the loc of me
                  add 0.25 to item 4 of line n.lineNum of field "Note Database"
                  add 0.25 to item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
               case item 1 of the mouseLoc < the left of me + (the width of grc "Note Copy" / 4) -- Left
                  set the loc of me to item 1 of the loc of me - the width of grc "Note Copy" / 4, item 2 of the loc of me
                  subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                  subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
            end switch
            break
            -- Right
         case item 1 of the clickLoc + (n.rightAdjust * (the width of grc "Note Copy" / 4)) >= the right of me - n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc > the left of me + n.Edge then
               switch
                  case item 1 of the mouseLoc >= the right of me + n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                     add 0.25 to item 5 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.rightAdjust
                     break 
                  case item 1 of the mouseLoc <= the right of me - n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                        subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.rightAdjust
                     end if
                     break 
               end switch
            end if
            break
            -- Left
         case item 1 of the clickLoc - (n.leftAdjust * (the width of grc "Note Copy" / 4)) <= the left of me + n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc < the right of me + n.Edge then
               switch
                  case item 1 of the mouseLoc <= the left of me - n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                     subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.leftAdjust
                     break 
                  case item 1 of the mouseLoc >= the left of me + n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                        add 0.25 to item 4 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.leftAdjust
                     end if
                     break 
               end switch
            end if
            break
      end switch
   end if
   unlock screen
end mouseMove
  : yy#"  XXUU       Z8          cREVGeneral    revUniqueID  
1432606945699scripteditorvscroll  1350scripteditorselection  5869  = Note 16  KPon mouseLeave
   lock screen
   set the lineSize of me to "1"
   unlock screen
end mouseLeave


local n.rightAdjust
local n.leftAdjust
local w.State


on mouseDown
   send noteClicked && (the name of me) to this card
   put 0 into n.rightAdjust
   put 0 into n.leftAdjust
   put "" into w.State
end mouseDown


on mouseMove
   lock screen
   set the lineSize of me to "2"
   put 5 into n.Edge
   if mouse(1) is "Down" and the hilitedLine of field "Note Database" is not "" then 
      put the hilitedLine of field "Note Database" into n.lineNum
      switch
         -- Middle
         default
            put "Middle" into w.State
            switch
               case item 2 of the mouseLoc < the top of me -- Up
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me - the height of grc "Note Copy"
                  subtract 1 from item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  break 
               case item 2 of the mouseLoc > the bottom of me -- Down
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me + the height of grc "Note Copy"
                  add 1 to item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  break 
               case item 1 of the mouseLoc > the right of me - (the width of grc "Note Copy" / 4)  -- Right
                  set the loc of me to item 1 of the loc of me + the width of grc "Note Copy" / 4, item 2 of the loc of me
                  add 0.25 to item 4 of line n.lineNum of field "Note Database"
                  add 0.25 to item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
               case item 1 of the mouseLoc < the left of me + (the width of grc "Note Copy" / 4) -- Left
                  set the loc of me to item 1 of the loc of me - the width of grc "Note Copy" / 4, item 2 of the loc of me
                  subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                  subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
            end switch
            break
            -- Right
         case item 1 of the clickLoc + (n.rightAdjust * (the width of grc "Note Copy" / 4)) >= the right of me - n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc > the left of me + n.Edge then
               switch
                  case item 1 of the mouseLoc >= the right of me + n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                     add 0.25 to item 5 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.rightAdjust
                     break 
                  case item 1 of the mouseLoc <= the right of me - n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                        subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.rightAdjust
                     end if
                     break 
               end switch
            end if
            break
            -- Left
         case item 1 of the clickLoc - (n.leftAdjust * (the width of grc "Note Copy" / 4)) <= the left of me + n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc < the right of me + n.Edge then
               switch
                  case item 1 of the mouseLoc <= the left of me - n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                     subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.leftAdjust
                     break 
                  case item 1 of the mouseLoc >= the left of me + n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                        add 0.25 to item 4 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.leftAdjust
                     end if
                     break 
               end switch
            end if
            break
      end switch
   end if
   unlock screen
end mouseMove
  : yy#"  XXUU       n           cREVGeneral    revUniqueID  
1432606945700scripteditorvscroll  1350scripteditorselection  5869  > Note 17  KPon mouseLeave
   lock screen
   set the lineSize of me to "1"
   unlock screen
end mouseLeave


local n.rightAdjust
local n.leftAdjust
local w.State


on mouseDown
   send noteClicked && (the name of me) to this card
   put 0 into n.rightAdjust
   put 0 into n.leftAdjust
   put "" into w.State
end mouseDown


on mouseMove
   lock screen
   set the lineSize of me to "2"
   put 5 into n.Edge
   if mouse(1) is "Down" and the hilitedLine of field "Note Database" is not "" then 
      put the hilitedLine of field "Note Database" into n.lineNum
      switch
         -- Middle
         default
            put "Middle" into w.State
            switch
               case item 2 of the mouseLoc < the top of me -- Up
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me - the height of grc "Note Copy"
                  subtract 1 from item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  break 
               case item 2 of the mouseLoc > the bottom of me -- Down
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me + the height of grc "Note Copy"
                  add 1 to item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  break 
               case item 1 of the mouseLoc > the right of me - (the width of grc "Note Copy" / 4)  -- Right
                  set the loc of me to item 1 of the loc of me + the width of grc "Note Copy" / 4, item 2 of the loc of me
                  add 0.25 to item 4 of line n.lineNum of field "Note Database"
                  add 0.25 to item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
               case item 1 of the mouseLoc < the left of me + (the width of grc "Note Copy" / 4) -- Left
                  set the loc of me to item 1 of the loc of me - the width of grc "Note Copy" / 4, item 2 of the loc of me
                  subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                  subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
            end switch
            break
            -- Right
         case item 1 of the clickLoc + (n.rightAdjust * (the width of grc "Note Copy" / 4)) >= the right of me - n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc > the left of me + n.Edge then
               switch
                  case item 1 of the mouseLoc >= the right of me + n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                     add 0.25 to item 5 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.rightAdjust
                     break 
                  case item 1 of the mouseLoc <= the right of me - n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                        subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.rightAdjust
                     end if
                     break 
               end switch
            end if
            break
            -- Left
         case item 1 of the clickLoc - (n.leftAdjust * (the width of grc "Note Copy" / 4)) <= the left of me + n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc < the right of me + n.Edge then
               switch
                  case item 1 of the mouseLoc <= the left of me - n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                     subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.leftAdjust
                     break 
                  case item 1 of the mouseLoc >= the left of me + n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                        add 0.25 to item 4 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.leftAdjust
                     end if
                     break 
               end switch
            end if
            break
      end switch
   end if
   unlock screen
end mouseMove
  : yy#"  XXUU        
         cREVGeneral    revUniqueID  
1432606945701scripteditorvscroll  1350scripteditorselection  5869  ? Note 18  KPon mouseLeave
   lock screen
   set the lineSize of me to "1"
   unlock screen
end mouseLeave


local n.rightAdjust
local n.leftAdjust
local w.State


on mouseDown
   send noteClicked && (the name of me) to this card
   put 0 into n.rightAdjust
   put 0 into n.leftAdjust
   put "" into w.State
end mouseDown


on mouseMove
   lock screen
   set the lineSize of me to "2"
   put 5 into n.Edge
   if mouse(1) is "Down" and the hilitedLine of field "Note Database" is not "" then 
      put the hilitedLine of field "Note Database" into n.lineNum
      switch
         -- Middle
         default
            put "Middle" into w.State
            switch
               case item 2 of the mouseLoc < the top of me -- Up
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me - the height of grc "Note Copy"
                  subtract 1 from item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  break 
               case item 2 of the mouseLoc > the bottom of me -- Down
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me + the height of grc "Note Copy"
                  add 1 to item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  break 
               case item 1 of the mouseLoc > the right of me - (the width of grc "Note Copy" / 4)  -- Right
                  set the loc of me to item 1 of the loc of me + the width of grc "Note Copy" / 4, item 2 of the loc of me
                  add 0.25 to item 4 of line n.lineNum of field "Note Database"
                  add 0.25 to item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
               case item 1 of the mouseLoc < the left of me + (the width of grc "Note Copy" / 4) -- Left
                  set the loc of me to item 1 of the loc of me - the width of grc "Note Copy" / 4, item 2 of the loc of me
                  subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                  subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
            end switch
            break
            -- Right
         case item 1 of the clickLoc + (n.rightAdjust * (the width of grc "Note Copy" / 4)) >= the right of me - n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc > the left of me + n.Edge then
               switch
                  case item 1 of the mouseLoc >= the right of me + n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                     add 0.25 to item 5 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.rightAdjust
                     break 
                  case item 1 of the mouseLoc <= the right of me - n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                        subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.rightAdjust
                     end if
                     break 
               end switch
            end if
            break
            -- Left
         case item 1 of the clickLoc - (n.leftAdjust * (the width of grc "Note Copy" / 4)) <= the left of me + n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc < the right of me + n.Edge then
               switch
                  case item 1 of the mouseLoc <= the left of me - n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                     subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.leftAdjust
                     break 
                  case item 1 of the mouseLoc >= the left of me + n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                        add 0.25 to item 4 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.leftAdjust
                     end if
                     break 
               end switch
            end if
            break
      end switch
   end if
   unlock screen
end mouseMove
  : yy#"  XXUU         P         cREVGeneral    revUniqueID  
1432606945702scripteditorvscroll  1350scripteditorselection  5869
  D Song Database  )h       Q j       'on mouseDown
   lock screen
   
   if the mouseV > ( (the effective textHeight of me) * (the number of lines in me) + the top of me ) then 
      set the hilitedLine of me to ""
      put "" into field "Song Name"
      set the disabled of fld "Song Name" to "True"
      set the disabled of btn "Save" to "True"
      set the disabled of btn "Load" to "True"
   end if
   
   if the hilitedLine of me is not "" then
      put line (the hilitedLine of me) of me into field "Song Name"
      set the enabled of fld "Song Name" to "True"
      set the enabled of btn "Save" to "True"
      set the enabled of btn "Load" to "True"
   end if
   
   unlock screen
end mouseDown


on focusOut
   lock screen
   
   if within(field "Song Name", the mouseLoc) is not "True" then
      put "" into fld "Song Name"
      set the disabled of fld "Song Name" to "True"
      set the disabled of btn "Save" to "True"
      set the disabled of btn "Load" to "True"
      set the hilitedLine of field "Song Database" to ""
   end if
   
   unlock screen
end focusOut
                cREVGeneral    revUniqueID  
1432606945704scripteditorvscroll  78scripteditorselection  1051    
'         L    	`       k    F Save p&on mouseUp
   lock screen
   
   send exitField to field "Song Name"
   set the disabled of fld "Song Name" to "True"
   set the disabled of btn "Save" to "True"
   set the disabled of btn "Load" to "True"
   set the hilitedLine of field "Song Database" to ""
   
   unlock screen
end mouseUp
     @QV K                                       cREVGeneral    revUniqueID  
1432607722667scripteditorselection  259debugParameters   debugEntryHandler  	M,mouseUpscripteditorvscroll  0	       G Load `    @V K                                       cREVGeneral    revUniqueID  
1432607724013	     
  H Song Database Data  )h        j                        cREVGeneral    revUniqueID  
1432608085258    
'       
  I lbl Song Database M       L U d                        cREVGeneral    revUniqueID  
1432608159791      S o n g   D a t a b a s e   : 
'      
  J 
Song Name  9h       Ql        on exitField
   lock screen
   if me is not "" then
      put the hilitedLine of field "Song Database" into n.LineNum
      put "" & me into line n.LineNum of field "Song Database"
      set the hilitedLine of field "Song Database" to n.lineNum
   end if
   unlock screen
end exitField

on rawKeyDown theKey
   
   switch theKey
      case "65293" 
         send exitField to me 
         put "" into fld "Song Name"
         set the disabled of fld "Song Name" to "True"
         set the disabled of btn "Save" to "True"
         set the disabled of btn "Load" to "True"
         set the hilitedLine of field "Song Database" to ""
         break
      default pass rawKeyDown break
   end switch
   
end rawKeyDown
                cREVGeneral    revUniqueID  
1432608387432scripteditorvscroll  0scripteditorselection  641    
'          Play %won mouseUp
   
   put field "Note Database" into f.Note_Database
   put convertSheetMusic(f.Note_Database) into f.Input
   
   --put the label of button "Instrument 1" into a.Instrument[1]
   --put the label of button "Instrument 2" into a.Instrument[2]
   
   put "Piano" into a.Instrument[1]
   put "Piano" into a.Instrument[2]
   
   start player "Piano Player 0"
   wait for 100 milliseconds
   stop player "Piano Player 0"
   
   put (60000 / field "Song Tempo") into f.Tempo
   
   set the layer of grc "Playhead" to -1
   put calculateMoveData(f.Note_Database, f.Input, f.Tempo) into iList.moveData
   put item 1 of iList.moveData into n.moveTime
   put line (item 2 of iList.moveData) to -1 of f.Input into f.Input
   
   put 0 into counter
   repeat until counter is (the number of lines in f.Input) - 1
      add 1 to counter
      put (item 2 of line counter+1 of f.Input) - (item 2 of line counter of f.Input) & "," after iList.Wait_Times
   end repeat
   move grc "Playhead" from the loc of grc "Playhead" to the right of grc ("Note" && item 5 of line -1 of f.Input), item 2 of the loc of grc "Playhead" in n.moveTime milliseconds without waiting
   
   repeat for each line current_line in f.Input
      add 1 to c.Wait
      put a.Instrument[item 1 of current_line] into theInstrument
      put item 4 of current_line into thePitch
      set the currentTime of player (theInstrument && "Player" && thePitch) to 0 
      start player ("Piano Player" && thePitch)
      wait for (item c.Wait of iList.Wait_Times) * f.Tempo milliseconds
   end repeat
   
   /*
   put 1 into c.Wait
   put the milliseconds into Starting_Time
   repeat until c.Wait > the number of items in iList.Wait_Times + 1
      --!! If space was not pressed, then
      if the milliseconds - Starting_Time >= (item c.Wait of iList.Wait_Times) * f.Tempo then
         put line c.Wait of f.Input into current_line
         put a.Instrument[item 1 of current_line] into theInstrument
         put item 4 of current_line into thePitch
         set the currentTime of player (theInstrument && "Player" && thePitch) to 0 
         start player ("Piano Player" && thePitch)
         put the milliseconds into Starting_Time
         add 1 to c.Wait
      end if
      --!! else exit repeat
   end repeat
   */
   
end mouseUp


function convertSheetMusic f.Input
   lock screen
   
   sort lines of f.Input ascending numeric by item 4 of each   
   
   put field "Current Pitch Names" into f.Current_Pitch_Names
   put field "Current Pitch Numbers" into f.Current_Pitch_Numbers
   
   repeat for each line Current_Line in f.Input
      put item 2 of Current_Line into n.Num
      put item -1 of Current_Line into n.Instrument
      put item 4 of Current_Line into n.Start
      put item 5 of Current_Line into n.Stop
      put line (item 3 of Current_Line) of field "Sheet Music Pitches Display" into w.Pitch
      put 0 into counter
      repeat until line counter of f.Current_Pitch_Names is w.Pitch
         add 1 to counter
      end repeat
      put line counter of f.Current_Pitch_Numbers into n.Pitch
      
      put n.Instrument & "," & n.Start & "," & n.Stop & "," & n.Pitch & "," & n.Num & cr after Output
   end repeat
   
   return line 1 to -1 of Output
   
   unlock screen
end convertSheetMusic


function calculateMoveData f.Note_Database, f.Input, f.Tempo
   
   repeat for each line Current_Line in f.Note_Database
      if intersect ( grc ("Note" && item 2 of Current_Line), grc "Playhead" ) then
         if the right of grc ("Note" && item 2 of Current_Line) is not item 1 of the loc of grc "Playhead" then 
            put Current_line & cr after iList.Intersect
         end if
      end if
   end repeat
   put line 1 to -1 of iList.Intersect into iList.Intersect
   
   switch
      case the number of lines in iList.Intersect > 1 
      case the number of lines in iList.Intersect is 1
         sort iList.Intersect ascending numeric by item 4 of each 
         set the left of grc "Playhead" to the left of grc ("Note" && item 2 of line 1 of iList.Intersect) break
      case the number of lines in iList.Intersect is 0
         set the left of grc "Playhead" to the left of grc ("Note" && item 5 of line 1 of f.Input) break
   end switch
   
   if iList.Intersect is not "" 
   then put item 4 of line 1 of iList.Intersect into n.Starting_Beat
   else put item 2 of line 1 of f.Input into n.Starting_Beat
   put item 3 of line -1 of f.Input into n.Ending_Beat
   put (n.Ending_Beat - n.Starting_Beat) * round(f.Tempo) into n.moveTime
   
   put 0 into counter
   repeat until item 2 of line counter of f.Input is n.Starting_Beat
      add 1 to counter
   end repeat
   put counter into n.startingLine
   
   return n.moveTime, n.startingLine
end calculateMoveData
        /                            Play               cREVGeneral    scripteditorselection  1476revUniqueID  
1432578436919debugParameters   debugEntryHandler  	M,mouseUpscripteditorvscroll  270	       ] 
Note Copy  KPon mouseLeave
   lock screen
   set the lineSize of me to "1"
   unlock screen
end mouseLeave


local n.rightAdjust
local n.leftAdjust
local w.State


on mouseDown
   send noteClicked && (the name of me) to this card
   put 0 into n.rightAdjust
   put 0 into n.leftAdjust
   put "" into w.State
end mouseDown


on mouseMove
   lock screen
   set the lineSize of me to "2"
   put 5 into n.Edge
   if mouse(1) is "Down" and the hilitedLine of field "Note Database" is not "" then 
      put the hilitedLine of field "Note Database" into n.lineNum
      switch
         -- Middle
         default
            put "Middle" into w.State
            switch
               case item 2 of the mouseLoc < the top of me -- Up
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me - the height of grc "Note Copy"
                  subtract 1 from item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  break 
               case item 2 of the mouseLoc > the bottom of me -- Down
                  set the loc of me to item 1 of the loc of me, item 2 of the loc of me + the height of grc "Note Copy"
                  add 1 to item 3 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  send playPitch && (the name of me) to this card
                  break 
               case item 1 of the mouseLoc > the right of me - (the width of grc "Note Copy" / 4)  -- Right
                  set the loc of me to item 1 of the loc of me + the width of grc "Note Copy" / 4, item 2 of the loc of me
                  add 0.25 to item 4 of line n.lineNum of field "Note Database"
                  add 0.25 to item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
               case item 1 of the mouseLoc < the left of me + (the width of grc "Note Copy" / 4) -- Left
                  set the loc of me to item 1 of the loc of me - the width of grc "Note Copy" / 4, item 2 of the loc of me
                  subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                  subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                  set the hilitedline of field "Note Database" to n.lineNum 
                  break 
            end switch
            break
            -- Right
         case item 1 of the clickLoc + (n.rightAdjust * (the width of grc "Note Copy" / 4)) >= the right of me - n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc > the left of me + n.Edge then
               switch
                  case item 1 of the mouseLoc >= the right of me + n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                     add 0.25 to item 5 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.rightAdjust
                     break 
                  case item 1 of the mouseLoc <= the right of me - n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                        subtract 0.25 from item 5 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.rightAdjust
                     end if
                     break 
               end switch
            end if
            break
            -- Left
         case item 1 of the clickLoc - (n.leftAdjust * (the width of grc "Note Copy" / 4)) <= the left of me + n.Edge and (w.State is not "Middle")
            if item 1 of the mouseLoc < the right of me + n.Edge then
               switch
                  case item 1 of the mouseLoc <= the left of me - n.Edge
                     put the loc of me into theLoc
                     set the width of me to the width of me + (the width of grc "Note Copy" / 4)
                     set the loc of me to item 1 of theLoc - (the width of grc "Note Copy" / 8), item 2 of theLoc
                     subtract 0.25 from item 4 of line n.lineNum of field "Note Database"
                     set the hilitedline of field "Note Database" to n.lineNum
                     add 1 to n.leftAdjust
                     break 
                  case item 1 of the mouseLoc >= the left of me + n.Edge
                     if the width of me > (the width of grc "Note Copy" / 4) then /* larger than 10 */
                        put the loc of me into theLoc
                        set the width of me to the width of me - (the width of grc "Note Copy" / 4)
                        set the loc of me to item 1 of theLoc + (the width of grc "Note Copy" / 8), item 2 of theLoc
                        add 0.25 to item 4 of line n.lineNum of field "Note Database"
                        set the hilitedline of field "Note Database" to n.lineNum
                        subtract 1 from n.leftAdjust
                     end if
                     break 
               end switch
            end if
            break
      end switch
   end if
   unlock screen
end mouseMove
  : yy#"  XXUU        (         cREVGeneral    revUniqueID  
1432606945703scripteditorvscroll  1350scripteditorselection  5869  9 Sheet Music Bottom Border  K@  BBBBBB     ^         cREVGeneral    revUniqueID  
1432069892640
  ^ Field  )h        $                         cREVGeneral    revUniqueID  
1432854756605   # S n a p p i n g   P l a y h e a d 
'      " ' M o u s e   D r a g   P l a y h e a d 
'      &  
'        / D r a g   u p   /   d o w n   1 / 4   s i z e 
'      .  
'         K e y 
'        
'        ] M o v e   /   E x t e n d   o n l y   i f   n o t   i n t e r s e c t   o t h e r   n o t e 
'     \  
'       1 M e t a d a t a   I n p u t / S a v e / L o a d 
'     0  
'       ; T r a c k   T o o l ! ! !   ( m o v e   a l l   d r a g ) 
'     :  _ convertGraphicaltoSheet pon convertGraphicaltoSheet
   put field "Note Database" into f.Note_Database
   
   sort lines of f.Note_Database ascending numeric by item 4 of each
   sort lines of f.Note_Database ascending numeric by item 6 of each
   
   repeat for each line Current_Line in f.Note_Database
      put item 6 of Current_Line into n.Instrument
      put item 5 of Current_Line - item 4 of Current_Line into d.Duration      
      dispatch function "findPitch" to this card with (item 2 of Current_Line) 
      put the result into d.Pitch
      
      put "(" & d.Duration & "," & d.Pitch & ")" & " " after a.[n.Instrument]
   end repeat
   
   repeat for the number of elements in a.
      add 1 to counter
      put "Instrument 1: " & cr & a.[counter] & cr & cr after d.Output
   end repeat
   put line 1 to -1 of d.Output into d.Output
   
   put d.Output into field "Debug"
   
end convertGraphicaltoSheet
     @                                        cREVGeneral    scripteditorvscroll  0scripteditorselection  894revUniqueID  
1432912148262	       a Sheet Music Playhead Drag Box  KPblocal n.Previous


on mouseMove
   if mouse(1) is "Down"
   then send movePlayHead to me
end mouseMove


on mouseDown
   lock screen
   
   send movePlayHead to me
   
   unlock screen
end mouseDown


on movePlayHead
   lock screen
   
   put 0 into counter -- make more accurate
   repeat until the left of me + (counter * (the width of grc "Note Copy" / 4) ) >= item 1 of the clickLoc
      add 1 to counter
   end repeat
   
   set the loc of grc "Playhead" to the left of me + ((counter - 1) * (the width of grc "Note Copy" / 4)) + 1, item 2 of loc of grc "Playhead"
   
   unlock screen
end movePlayHead
       k"         cREVGeneral    revUniqueID  
1432993420778scripteditorvscroll  0scripteditorselection  200
  d Piano Input  )h       _ % !       on keyDown theKey
   put "1,2,3,4,5,6,7,8,9,0,q,w,e,r,t,y,u,i,o,p,a,s,d,f,g,h,j,k,l,z,x,c,v,b,n,m" into iList.Keys
   put 0 into counter
   repeat until theKey is item counter of iList.Keys or counter > the number of items in iList.Keys
      add 1 to counter
   end repeat
   if counter <= the number of items in iList.Keys then
      put "7" into n.startingNote
      put line n.startingNote + counter of field "Current Pitch Names" into theResult
      find theResult in field "Chromatic Pitches"
      put (word 2 of the foundLine) into playerNum
      set the currentTime of player ("Piano Player" && playerNum) to 0 
      start player ("Piano Player" && playerNum)
      find "" in field "Chromatic Pitches"
   end if
   put "" into me
end keyDown
                cREVGeneral    revUniqueID  
1433297844344scripteditorselection  51debugParameters  theKey,debugEntryHandler  	M,keyDownscripteditorvscroll  0    
'       
  e 
lbl Piano M       / # 3                        cREVGeneral    revUniqueID  
1433297844345      P i a n o   : 
'        _ 	Playhead  K@  		                m 
         cREVGeneral    revUniqueID  
1432569197655scripteditorvscroll  0scripteditorselection  0 